油猴脚本,自动关闭页面弹窗


 

 

 

 

// ==UserScript==
// @name         自动关闭oa的聊天弹窗按钮
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        *://oa.zhixueyun.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    var startTime=new Date().getTime();

    var dingShiId= window.setInterval(function(){
//        if(new Date().getTime()-startTime>6000000){
//            //超过6000秒,移除定时器
//            clearInterval(dingShiId)
//        }

        //移除弹窗
        var dl=document.querySelector(".eMobile-modal");
        if(dl!=null){
            //检测到弹窗,移除定时器
            clearInterval(dingShiId)
            dl.remove();
        }

        //定时器:500毫秒一次
    }, 500);

})();

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM