Moegirl Wiki Mobile Optimization

Optimize the mobile experience of Moegirl Wiki by removing annoying ad-block detection popups!

// ==UserScript==
// @name               Moegirl Wiki Mobile Optimization
// @name:zh-CN         萌娘百科移动端优化
// @name:zh-TW         萌娘百科手機版優化
// @namespace          https://www.imxiaoanag.com
// @version            1.0.0
// @description        Optimize the mobile experience of Moegirl Wiki by removing annoying ad-block detection popups!
// @description:zh-CN  优化萌娘百科手机版体验,去除烦人的广告屏蔽提示!
// @description:zh-TW  優化萌娘百科手機端體驗,去除煩人的廣告屏蔽提示!
// @icon               data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCA1LjEuMvu8A7YAAAC2ZVhJZklJKgAIAAAABQAaAQUAAQAAAEoAAAAbAQUAAQAAAFIAAAAoAQMAAQAAAAIAAAAxAQIAEAAAAFoAAABphwQAAQAAAGoAAAAAAAAAYAAAAAEAAABgAAAAAQAAAFBhaW50Lk5FVCA1LjEuMgADAACQBwAEAAAAMDIzMAGgAwABAAAAAQAAAAWgBAABAAAAlAAAAAAAAAACAAEAAgAEAAAAUjk4AAIABwAEAAAAMDEwMAAAAADp1fY4ytpsegAAB4VJREFUSEudVl1sk9cZfs/5zvn+bcdxHDuOQ2LHgUEKE0L9WSIKE9BKa4gqtlUUTeNm45JNmtSLXaBt0rqrSVNvJm4moVbqxTakiU7VULsIaZCiCgorYQQUNyFOYpvE8d9nf/6+87MLmyRyu6rsuTvved7n0XvO+33vQVJK+BIkSAECADBgBKh7+1mAvtLAZ/5aY63klQCgV+/t1/p1qneTAACg0Cpka1kFKWOhsTAJd2//L4OiU5wtzs5V5jjmoz2jB3sP7rZ3K6B00VqydXXl6pXFKxrWTo+dnoxOdhEAgAAAB+4y12Wuxz0mGcPsgfvgGrv2qfyUAUujdB7lc61cp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0ihY90g2zcphPCl73DH5S7BJKAEDNI5pWcz+D/wX2G/hjjXbkBsAAAAAElFTkSuQmCC
// @author             imxiaoanag
// @match              http*://*.moegirl.org.cn/*
// @run-at             document-end
// @grant              none
// @license            MIT
// ==/UserScript==

(function() {
    'use strict';
    
    function removeAdBlockReminder() {
        let imgElements = document.querySelectorAll('img[src="https://www.gstatic.com/images/icons/material/system/1x/warning_amber_24dp.png"]');
        
        imgElements.forEach(img => {
            let innerDiv = img.parentElement;
            if (innerDiv) {
                let externalDiv = innerDiv.parentElement;
                if (externalDiv) {
                    externalDiv.parentElement.removeChild(externalDiv);
                }
            }
        });
    }

    removeAdBlockReminder();

    let observer = new MutationObserver(removeAdBlockReminder);
    observer.observe(document.body, { childList: true, subtree: true });

    window.addEventListener('load', removeAdBlockReminder);
})();