Skip to content

Instantly share code, notes, and snippets.

@aggieben
Created January 30, 2015 21:03
Show Gist options
  • Save aggieben/b610b7577854e7d21003 to your computer and use it in GitHub Desktop.
Save aggieben/b610b7577854e7d21003 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Herald Banner Unblocker
// @namespace http://github.com/aggieben
// @version 0.1
// @description get rid of the super-annoying paywall
// @match http://www.heraldbanner.com/*
// @copyright 2015+, You
// @run-at document-end
// @grant GM_log
// ==/UserScript==
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(m) {
if (m.type === 'childList') {
for (var i = 0; i < m.addedNodes.length; i++) {
var node = m.addedNodes[i];
if (node.nodeType == Node.ELEMENT_NODE) {
if (node.id === 'ta_background' || node.id === 'ta_invisible') {
node.remove();
}
}
}
}
});
});
var config = {
attributes: true,
childList: true,
subtree: true,
characterData: true
};
observer.observe(document, config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment