油猴腳本,自動關閉頁面彈窗


 

 

 

 

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