zoukankan      html  css  js  c++  java
  • 油猴脚本,自动关闭页面弹窗

    // ==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);
    
    })();
  • 相关阅读:
    Java中 Jwt
    Python中Jwt
    jwt流程
    Vue Demons
    Vue基础
    Mysql
    MongoDb
    2020/03/07-基础复习day_02
    2020/03/07-基础复习day_01
    基于springboot+dubbo的简易分布式小Demo
  • 原文地址:https://www.cnblogs.com/wulm/p/15271733.html
Copyright © 2011-2022 走看看