Skip to content

Instantly share code, notes, and snippets.

@Tiny-Giant
Last active August 29, 2015 14:27
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 Tiny-Giant/4697abdfe8e050b93d17 to your computer and use it in GitHub Desktop.
Save Tiny-Giant/4697abdfe8e050b93d17 to your computer and use it in GitHub Desktop.
// ==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