Microsoft Edge Ad Blocker

This is blocker for Edge ads on Microsoft websites. DISCLAIMER! Author isn't affiliated with Google, Apple and other Microsoft haters. Suсk it! We all love Microsoft, but sometimes their pushes are a bit annoying

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Microsoft Edge Ad Blocker
// @namespace    http://microsoft.com/
// @version      0.3
// @description  This is blocker for Edge ads on Microsoft websites. DISCLAIMER! Author isn't affiliated with Google, Apple and other Microsoft haters. Suсk it! We all love Microsoft, but sometimes their pushes are a bit annoying
// @author       Kenya-West
// @match        https://*.live.com/*
// @match        http*://*.office.com/*
// @match        http*://*.microsoft.com/*
// @match        http*://*.xbox.com/*
// @match        http*://*.skype.com/*
// @match        http*://*.mixer.com/*
// @match        http*://*.outlook.com/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    var adList = [
        "#epb",
        "#edgePromotion",
        "ohp-announcement",
        ".ms-bgc-ns.notificationBarSlideIn"
    ];

    for (var i = 0; i < adList.length; i++) {
        try {
            document.querySelector(adList[i]).style.display = "none";
            console.log("Microsoft Edge Ad Blocker successfully blocker the banner '" + adList[i] + "'"); //production::enable
        } catch (err) {}
    }
})();