-
-
Save romuald/f1678c197a9e71fb187c to your computer and use it in GitHub Desktop.
Greasemonkey script to hide the "small" Wikipedia fundraiser banner
This file contains hidden or 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 No Wikipedia fundraiser | |
// @namespace http://chivil.com/ | |
// @version 0.1 | |
// @description Should hide Wikipedia "small" banner on each page | |
// @author Romuald Brunet | |
// @match https://*.wikipedia.org/* | |
// @grant none | |
// @run-at document-end | |
// ==/UserScript== | |
function checkBanner() { | |
if ( window.mw && mw.centralNotice && mw.centralNotice.bannerData ) { | |
mw.centralNotice.bannerData.hideResult = true; | |
/* | |
if ( window.fundraisingBanner ) { | |
fundraisingBanner.hide(); | |
} | |
*/ | |
} else if ( (new Date()).getTime() < giveup ) { | |
window.setTimeout(checkBanner, 10); | |
} | |
} | |
// Stop polling after 4 seconds | |
var giveup = (new Date()).getTime() + 4000; | |
window.setTimeout(checkBanner, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't work