Demo:komari.noyu.moe
虽然是哪吒的美化代码,但是Komari的Nezha主题也能用。
Komari的Nezha主题:https://github.com/BITJEBE/nezha-BITJEBE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 <!-- 烟花特效 --> <script src="https://cdn.jsdelivr.net/gh/kamanfaiz/Nezha-Dash-UI@main/js/fireworks.js"></script> <style> /* ===== 抖音 Sans 字体 ===== */ @font-face { font-family: 'Douyin Sans'; src: url('https://cdn.jsdelivr.net/gh/bytedance/fonts@main/DouyinSans/DouyinSansBold.ttf') format('truetype'); font-weight: bold; font-style: normal; font-display: swap; } * { font-family: 'Douyin Sans', sans-serif !important; } h1, h2, h3, h4, h5 { font-family: 'Douyin Sans', sans-serif !important; font-weight: bold; } </style> <script> /* ===== 基础配置 ===== */ window.CustomBackgroundImage = 'https://i.111666.best/image/1N8OaC7za3z5JT43aRrcZS.jpeg'; window.CustomMobileBackgroundImage = 'https://i.111666.best/image/K2faDOZrdCwi3oBhvXn1lf.jpeg'; window.CustomLogo = 'https://i.111666.best/image/aO68LlStwF4yeyhjWkDlDZ.png'; window.CustomDesc = "It's the only NEET thing to do."; window.ShowNetTransfer = true; window.DisableAnimatedMan = true; /* ===== 强制设置 favicon(核心) ===== */ (function () { const url = window.CustomLogo; function setFavicon(href) { let link = document.querySelector("link[rel*='icon']"); if (!link) { link = document.createElement("link"); link.rel = "icon"; document.head.appendChild(link); } link.href = href; } // 页面加载后设置 window.addEventListener("load", () => { setFavicon(url); }); // 防止被哪吒前端覆盖(关键) const observer = new MutationObserver(() => { setFavicon(url); }); observer.observe(document.head, { childList: true }); })(); /* ===== Footer 左侧隐藏 ===== */ const observerFooterLeft = new MutationObserver(() => { const footerLeft = document.querySelector('.server-footer-name > div:first-child'); if (footerLeft) { footerLeft.style.visibility = 'hidden'; observerFooterLeft.disconnect(); } }); observerFooterLeft.observe(document.body, { childList: true, subtree: true }); /* ===== Footer 右侧修改 ===== */ const observerFooterRight = new MutationObserver(() => { const footerRight = document.querySelector('.server-footer-theme'); if (footerRight) { footerRight.innerHTML = '<section>Powered by <a href="https://github.com/komari-monitor/komari" target="_blank"> Komari Monitor </a></section>'; observerFooterRight.disconnect(); } }); observerFooterRight.observe(document.body, { childList: true, subtree: true }); </script> <style> /* ===== 背景虚化 ===== */ .dark .bg-cover::after { content: ''; position: absolute; inset: 0; backdrop-filter: blur(0px); background-color: rgba(0, 0, 0, 0.6); } .light .bg-cover::after { content: ''; position: absolute; inset: 0; backdrop-filter: blur(0px); background-color: rgba(255, 255, 255, 0.3); } </style>
最新
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 <script> // PC 背景 window.CustomBackgroundImage = 'https://i.111666.best/image/F5M9rEF5XRjdJ2uqJ8v90F.jpeg'; // 手机背景 window.CustomMobileBackgroundImage = 'https://i.111666.best/image/nOM2DlBpXSxJcA4y9MO05H.jpg'; // Logo window.CustomLogo = 'https://i.111666.best/image/aO68LlStwF4yeyhjWkDlDZ.png'; window.CustomDesc = "It's the only NEET thing to do."; window.ShowNetTransfer = true; window.DisableAnimatedMan = true; window.FixedTopServerName = false; </script> <!-- 烟花特效 --> <script src="https://cdn.jsdelivr.net/gh/kamanfaiz/Nezha-Dash-UI@main/js/fireworks.js"></script> <style> /* ===== 背景虚化 ===== */ .dark .bg-cover::after{ content:''; position:absolute; inset:0; backdrop-filter:blur(6px); background-color:rgba(0,0,0,0.6); } .light .bg-cover::after{ content:''; position:absolute; inset:0; backdrop-filter:blur(6px); background-color:rgba(255,255,255,0.3); } /* 隐藏右上角按钮 */ [id="radix-:r0:"], [id="radix-:r2:"]{ display:none; } /* 控制按钮隐藏 */ .server-overview-controls section.flex.items-center.gap-2.w-full.overflow-hidden button:nth-child(-n+3){ display:none!important; } /* 隐藏 overview */ p.text-base.font-semibold, p.text-sm.font-medium.opacity-50{ display:none!important; } /* ===== 时间样式修复 ===== */ .flex.text-sm.font-medium.mt-0\.5{ font-size:1.3rem!important; font-weight:bold; opacity:.9!important; justify-content:center!important; align-items:center!important; color:#222!important; line-height:1!important; } html.dark .flex.text-sm.font-medium.mt-0\.5{ color:#fff!important; } /* 数字居中 */ .number__inner{ display:inline-block!important; width:2ch!important; text-align:center!important; vertical-align:middle!important; line-height:1!important; } /* 冒号对齐 */ .number-flow-react svg{ height:1.3rem!important; vertical-align:middle!important; } /* 隐藏右下角图片按钮 */ button:has(.lucide-image-minus), button.rounded-\[50px\][aria-haspopup="dialog"]{ display:none!important; } /* 隐藏控制按钮 */ .server-overview-controls{ display:none!important; } /* 隐藏 Theme - nezha-dash */ .server-footer-theme{ display:none!important; } /* Powered by 右对齐 */ footer{ display:flex!important; justify-content:flex-end!important; } </style> <style> /* 抖音 Sans 字体 */ @font-face{ font-family:'Douyin Sans'; src:url('https://cdn.jsdelivr.net/gh/bytedance/fonts@main/DouyinSans/DouyinSansBold.ttf') format('truetype'); font-weight:bold; font-style:normal; font-display:swap; } *{ font-family:'Douyin Sans',sans-serif!important; } </style> <script> /* GPU卡片自动删除 */ (function(){ const containerSelector="#root > div > main > div.mx-auto.w-full.max-w-5xl.px-0.flex.flex-col.gap-4.server-info > div:nth-child(3) > section > div:nth-child(2)" const pRelativeSelector="div > section > div.flex.items-center.justify-between > section.flex.flex-col.items-center.gap-2 > p" function processOne(container){ if(!container)return false const p=container.querySelector(pRelativeSelector)||container.querySelector("p") if(!p)return false const text=(p.textContent||"").trim() if(/gpu/i.test(text)){ container.remove() return true } return false } function findAndProcess(){ const container=document.querySelector(containerSelector) if(!container)return false return processOne(container) } findAndProcess() const mo=new MutationObserver(()=>{ findAndProcess() }) mo.observe(document.body,{childList:true,subtree:true}) })() </script> <script> /* UI布局脚本 */ const selectorButton='#root > div > main > div.mx-auto.w-full.max-w-5xl.px-0.flex.flex-col.gap-4.server-info > section > div.flex.justify-center.w-full.max-w-\\[200px\\] > div > div > div.relative.cursor-pointer.rounded-3xl.px-2\\.5.py-\\[8px\\].text-\\[13px\\].font-\\[600\\].transition-all.duration-500.text-stone-400.dark\\:text-stone-500'; const selectorSection='#root > div > main > div.mx-auto.w-full.max-w-5xl.px-0.flex.flex-col.gap-4.server-info > section'; const selector3='#root > div > main > div.mx-auto.w-full.max-w-5xl.px-0.flex.flex-col.gap-4.server-info > div:nth-child(3)'; const selector4='#root > div > main > div.mx-auto.w-full.max-w-5xl.px-0.flex.flex-col.gap-4.server-info > div:nth-child(4)'; let hasClicked=false; let divVisible=false; let swapping=false; function forceBothVisible(){ const div3=document.querySelector(selector3); const div4=document.querySelector(selector4); if(div3&&div4){ div3.style.display='block'; div4.style.display='block'; } } function hideSection(){ const section=document.querySelector(selectorSection); if(section){ section.style.display='none'; } } function tryClickButton(){ const btn=document.querySelector(selectorButton); if(btn&&!hasClicked){ btn.click(); hasClicked=true; setTimeout(forceBothVisible,500); } } function swapDiv3AndDiv4(){ if(swapping)return; swapping=true; const div3=document.querySelector(selector3); const div4=document.querySelector(selector4); if(!div3||!div4){ swapping=false; return; } const parent=div3.parentNode; if(parent!==div4.parentNode){ swapping=false; return; } parent.insertBefore(div4,div3); parent.insertBefore(div3,div4.nextSibling); swapping=false; } const observer=new MutationObserver(()=>{ const div3=document.querySelector(selector3); const div4=document.querySelector(selector4); const isDiv3Visible=div3&&getComputedStyle(div3).display!=='none'; const isDiv4Visible=div4&&getComputedStyle(div4).display!=='none'; const isAnyDivVisible=isDiv3Visible||isDiv4Visible; if(isAnyDivVisible&&!divVisible){ hideSection(); tryClickButton(); setTimeout(swapDiv3AndDiv4,100); }else if(!isAnyDivVisible&&divVisible){ hasClicked=false; } divVisible=isAnyDivVisible; if(div3&&div4){ if(!isDiv3Visible||!isDiv4Visible){ forceBothVisible(); } } }); const root=document.querySelector('#root'); if(root){ observer.observe(root,{ childList:true, attributes:true, subtree:true, attributeFilter:['style','class'] }); } </script>