logo NodeSeekbeta

哪吒v1主题的小改

12
  • 每天都有人给这个增加热度

  • 现在不用这么麻烦的改了

  • bd

  • bd

  • @林少 #13 现在怎么改,用官方的不好改大小和位置,用楼主的点击服务器详情再返回又会有bug

  • @tecmjj #16 我让ai改了一下,你看如何 xhj001

    <script>
    (function() {
        var originalPushState = history.pushState;
        var originalReplaceState = history.replaceState;
    
        history.pushState = function() {
            var result = originalPushState.apply(this, arguments);
            window.dispatchEvent(new Event('locationchange'));
            return result;
        };
    
        history.replaceState = function() {
            var result = originalReplaceState.apply(this, arguments);
            window.dispatchEvent(new Event('locationchange'));
            return result;
        };
    
        window.addEventListener('popstate', function() {
            window.dispatchEvent(new Event('locationchange'));
        });
    
        function addImageObserver() {
            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 = "https://img.sue.su/i/2024/12/12/675ae1368f7c4.png";
                    imgElement.style.position = "absolute";
                    imgElement.style.right = "8px";
                    imgElement.style.top = "-80px";
                    imgElement.style.zIndex = "10";
                    imgElement.style.width = "90px";
                    container.appendChild(imgElement);
                }
            });
            var config = { childList: true, subtree: true };
            observer.observe(document.body, config);
        }
    
        window.addEventListener('locationchange', function() {
            addImageObserver();
        });
    
        addImageObserver();
    })();
    </script>
    
12

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

📈用户数目📈

目前论坛共有71646位seeker

🎉欢迎新用户🎉