Greasy Fork

去除outlook使用了广告屏蔽软件的提示

MAGA!

// ==UserScript==
// @name         去除outlook使用了广告屏蔽软件的提示
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  MAGA!
// @author       xe5700
// @match        https://outlook.live.com/mail/*/inbox
// @require     https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @grant        none
// @run-at document-end
// ==/UserScript==

(function() {
    'use strict';
    let fuckoutlooktask = setInterval(()=>{
        try{
          let fucking_parent=$("[href='https://windows.microsoft.com/outlook/ad-free-outlook']").parent().parent().parent().parent();
          if(fucking_parent[0] != null){
            fucking_parent.remove();
          }else{
            return;
          }
          if($("[href='https://windows.microsoft.com/outlook/ad-free-outlook']")[0] == null){
            clearInterval(fuckoutlooktask);
            console.log("广告清理完成!");
          }
        }catch(e){

        }
    },500);
    // Your code here...
})();