界面美化哪吒V1探针前台界面美化
Faiz555事先声明
美化代码主要是在官方文档的基础上进行了特殊部位的优化,仅呈现简单的静态效果。
如需复杂的动态效果及其他效果,请自行编写代码。
官方美化自定义代码地址:https://nezhadash-docs.buycoffee.top/custom-code
美化效果展示:https://nzdb.faiz.us.kg/
代码展示
根据自身的需求,修改有注释的地方即可,其他地方懂的人可以随便动,不懂的话就别乱动了。
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
| <script> window.CustomBackgroundImage = 'https://abc123.com'; window.CustomMobileBackgroundImage = 'https://abc123.com'; window.CustomLogo = 'https://abc123.com'; window.CustomDesc = '欢迎来到我的哪吒监控'; window.ShowNetTransfer = true; window.ForceCardInline = false; window.DisableAnimatedMan = true; window.FixedTopServerName = false; window.CustomLinks = JSON.stringify([ { link: "https://abc123.com", name: "☕️博客" }, { link: "https://abc123.com", name: "⌛️节点保活" }, { link: "https://abc123.com", name: "📦GitHub" } ]); window.ForceTheme = ''; window.CustomIllustration = 'https://abc123.com';
const observer = new MutationObserver(function (mutationsList, observer) { const xpath = "/html/body/div/div/main/div[2]/section[1]/div[4]/div"; const container = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (container) { observer.disconnect();
const existingImg = container.querySelector("img"); if (existingImg) { container.removeChild(existingImg); }
const imgElement = document.createElement("img"); imgElement.src = window.CustomIllustration; imgElement.style.position = "absolute"; imgElement.style.right = "-100px"; imgElement.style.top = "-150px"; imgElement.style.zIndex = "10"; imgElement.style.width = "180px";
container.appendChild(imgElement); } });
const config = { childList: true, subtree: true }; observer.observe(document.body, config); </script>
|
为了避免网站加载的问题,请把相应的背景图片进行压缩,尽量保持在小于等于1mb。


Faiz555
全知全能的阿尼斯大人
此文章版权归Faiz所有,如有转载,请注明来自原作者