Last active
August 29, 2015 14:27
-
-
Save Tiny-Giant/4697abdfe8e050b93d17 to your computer and use it in GitHub Desktop.
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 SO Hide system message | |
// @namespace http://github.com/Tiny-Giant | |
// @version 0.1 | |
// @description Hide system messages on Stack Overflow | |
// @author @TinyGiant | |
// @match http://*.stackoverflow.com/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
(function(){ | |
"use strict"; | |
if(!localStorage['SOHideSystemMessage_done']) { | |
var m, interval = setInterval(function(){ | |
if(localStorage['SOHideSystemMessage_done']) clearInterval(interval); | |
m = document.getElementById('system-message') | |
if(m) if(m.firstChild.textContent === "Ten. Million. Questions. Let's celebrate ") { | |
clearInterval(interval); | |
document.head.innerHTML += '<style>#system-message { display: none; }</style>'; | |
} else localStorage['SOHideSystemMessage_done'] = true; | |
}); | |
} else if(!localStorage['SOHideSystemMessage_ack']) { | |
alert('The banner is gone, you should be able to remove this script now.'); | |
localStorage['SOHideSystemMessage_ack'] = true; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment