// ==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);

})();

 

posted on 2021-09-15 12:23  花开浪漫拾  阅读(1922)  评论(0编辑  收藏  举报