精簡MOJi辭書

A Tampermonkey browser script is used to make MOJiDict more streamlined to use.

// ==UserScript==
// @name         精简MOJi辞书
// @name:ja      簡潔MOJi辞書
// @name:zh-TW   精簡MOJi辭書
// @namespace    https://github.com/scarletkc/StreamlineMOJiDict
// @version      1.0
// @description  A Tampermonkey browser script is used to make MOJiDict more streamlined to use.
// @description:zh-TW  A Tampermonkey browser script is used to make MOJiDict more streamlined to use.
// @description:ja  A Tampermonkey browser script is used to make MOJiDict more streamlined to use.
// @author       Kc
// @match        *://www.mojidict.com/search
// @match        *://www.mojidict.com/
// @license      GPL-3.0 License
// ==/UserScript==

(function() {
    'use strict';
    var counters = 0;

    function DeleteDiv(className) {
        var elements = document.getElementsByClassName(className);
        var loop = setInterval(function(){            
            if(elements.length > 0) {              
                for (var i = 0; i < elements.length; i++) {
                    elements[i].remove();
                } 
                clearInterval(loop);
            }
            else{
                counters++;
                if(counters > 10){ 
                    clearInterval(loop);
                }
            }
        },3000);  
    }

    DeleteDiv("advertising-banner");
    DeleteDiv("sidebar-container hidden_scrollbar sidebar hidden_scrollbar");
    DeleteDiv("sidebar-container hidden_scrollbar sidebar hidden_scrollbar isfold");
    DeleteDiv("header-basic sideBarisfold");
    DeleteDiv("header-basic");
    DeleteDiv("footer-main");
    DeleteDiv("feedback-container");
    
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址