<script>window.CustomBackgroundImage = "背景图片地址";window.ShowNetTransfer = true;window.CustomIllustration = "小人图片地址";window.FixedTopServerName = true;window.ForceUseSvgFlag = true;let blurValue = 8; // 初始模糊(px)let opacityValue = 0.3; // 初始透明度(0~1)// 添加背景模糊遮罩(function addBlurOverlay() { const overlay = document.createElement("div"); overlay.id = "custom-blur-overlay"; overlay.style.position = "fixed"; overlay.style.top = "0"; overlay.style.left = "0"; overlay.style.width = "100%"; overlay.style.height = "100%"; overlay.style.pointerEvents = "none"; overlay.style.backdropFilter = `blur(${blurValue}px)`; overlay.style.backgroundColor = `rgba(255, 255, 255, ${opacityValue})`; overlay.style.zIndex = "1"; document.body.appendChild(overlay);})();// 创建控制面板(function createControlPanel() { const panel = document.createElement("div"); panel.id = "control-panel"; panel.style.position = "fixed"; panel.style.top = "20px"; panel.style.right = "20px"; panel.style.zIndex = "9999"; panel.style.background = "rgba(0,0,0,0.7)"; panel.style.color = "#fff"; panel.style.padding = "10px"; panel.style.borderRadius = "8px"; panel.style.width = "200px"; panel.style.fontFamily = "sans-serif"; panel.style.userSelect = "none"; panel.style.cursor = "move"; panel.innerHTML = ` <div style="font-weight:bold;margin-bottom:6px;">背景控制</div> 模糊: <input id="blurSlider" type="range" min="0" max="50" step="1" value="${blurValue}"> <span id="blurValue">${blurValue}</span>px<br><br> 透明度: <input id="opacitySlider" type="range" min="0" max="1" step="0.05" value="${opacityValue}"> <span id="opacityValue">${opacityValue.toFixed(2)}</span> `; document.body.appendChild(panel); const overlay = document.getElementById("custom-blur-overlay"); const blurSlider = panel.querySelector("#blurSlider"); const opacitySlider = panel.querySelector("#opacitySlider"); const blurText = panel.querySelector("#blurValue"); const opacityText = panel.querySelector("#opacityValue"); blurSlider.addEventListener("input", () => { blurValue = parseInt(blurSlider.value); overlay.style.backdropFilter = `blur(${blurValue}px)`; blurText.textContent = blurValue; }); opacitySlider.addEventListener("input", () => { opacityValue = parseFloat(opacitySlider.value); overlay.style.backgroundColor = `rgba(255, 255, 255, ${opacityValue})`; opacityText.textContent = opacityValue.toFixed(2); }); // 拖动面板功能 let isDragging = false; let offsetX, offsetY; panel.addEventListener("mousedown", (e) => { isDragging = true; offsetX = e.clientX - panel.getBoundingClientRect().left; offsetY = e.clientY - panel.getBoundingClientRect().top; }); document.addEventListener("mousemove", (e) => { if (isDragging) { panel.style.left = e.clientX - offsetX + "px"; panel.style.top = e.clientY - offsetY + "px"; panel.style.right = "auto"; } }); document.addEventListener("mouseup", () => { isDragging = false; });})();// 观察 DOM 变化并添加插图var observer = new MutationObserver(function(mutationsList, observer) { var xpath = "/html/body/div/div/main/div[2]/section[1]/div[4]/div"; var container = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; if (container) { observer.disconnect(); var existingImg = container.querySelector("img"); if (existingImg) { container.removeChild(existingImg); } var imgElement = document.createElement("img"); imgElement.src = "小人图片地址"; imgElement.style.position = "absolute"; imgElement.style.right = "-8px"; // 调节小人左右位置 imgElement.style.top = "-135px"; // 调节小人上下位置 imgElement.style.zIndex = "10"; imgElement.style.width = "120px"; // 调节小人大小 container.appendChild(imgElement); }});var config = { childList: true, subtree: true };observer.observe(document.body, config);</script>注意小人图片地址 是两处要填写 。内容一样。
评论 (0)