Skip to content

Instantly share code, notes, and snippets.

@Kenya-West
Created June 26, 2020 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kenya-West/abaa5cb11b962b65689595bfd0adca00 to your computer and use it in GitHub Desktop.
Save Kenya-West/abaa5cb11b962b65689595bfd0adca00 to your computer and use it in GitHub Desktop.
MS-Edge-Ad-Blocker

Microsoft Edge Ad Blocker

Description

This is blocker for Edge ads on Microsoft websites.

How to download

  1. You should have Tampermonkey
  2. Go to GreasyFork and click Install

How to contribute

  1. git clone https://github.com/Kenya-West/MS-Edge-Ad-Blocker
  2. And then change stuff

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

For personal use only Author doesn't guarantee if there will be some consequences after/before using/contributing

// ==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) {}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment