Last active
December 27, 2017 06:13
-
-
Save tzwm/84a4b31bdc5fe0cfaf5b8ac2f166461d to your computer and use it in GitHub Desktop.
Remove ugly logo from partner.outlook.cn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove ugly logo from partner.outlook.cn | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Samwise | |
// @match https://partner.outlook.cn/* | |
// @match https://liulishuo01-my.sharepoint.cn/* | |
// @match https://partner.microsoftonline.cn/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const LOGO_CLASS_NAME = 'o365cs-nav-gallatinLogo'; | |
let timeBegin = Date.now(); | |
let intervalId = setInterval(function() { | |
if (Date.now() - timeBegin > 40000) { | |
clearInterval(intervalId); | |
} | |
let logos = document.getElementsByClassName(LOGO_CLASS_NAME); | |
if (logos.length === 0) { | |
return; | |
} | |
for (let i = 0; i < logos.length; i++) { | |
logos[i].style.display = 'none'; | |
} | |
clearInterval(intervalId); | |
}, 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment