Greasy Fork

Greasy Fork is available in English.

文兴一言去码工具

文兴一言去除页面马赛克工具

当前为 2023-03-21 提交的版本,查看 最新版本

// ==UserScript==
// @name         文兴一言去码工具
// @namespace    http://tampermonkey.net/
// @version      0.2.1
// @description  文兴一言去除页面马赛克工具
// @author       kj
// @match        https://yiyan.baidu.com/**
// @icon         https://www.google.com/s2/favicons?sz=64&domain=yiyan.baidu.com
// @grant        none
// @run-at       document-idle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    var style = document.createElement('style');
    var check = function(){
        //var doms = Array.from(document.querySelectorAll('div')).filter(e=>!!/eb_\d+\.\d+/gi.exec(e.id));
        var doms = Array.from(document.querySelectorAll('div')).filter(e=>e.style.pointerEvents == 'none'&&e.style.display == 'block'&&e.offsetHeight==0&&e.offsetWidth==document.body.offsetWidth);
        if (doms.length>0){
            doms[0].style.visibility = 'hidden';
            doms[0].style.opacity = '0';
            setTimeout(check, 1);
        } else {
            setTimeout(check, 1000);
        }
    }
    check();
})();