Skip to content

Instantly share code, notes, and snippets.

@paragonie-scott
Forked from joepie91/1_changelog.md
Created February 19, 2016 00:00
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 paragonie-scott/33437cf0d18a13df9ce5 to your computer and use it in GitHub Desktop.
Save paragonie-scott/33437cf0d18a13df9ce5 to your computer and use it in GitHub Desktop.
Remove Wired's "ad-blocker veil"

Changelog

  • February 19, 2016: Initial release.

Broken?

GitHub Gist doesn't send notifications when people leave a comment, so shoot me an e-mail at admin@cryto.net. I'll gladly fix it. Fuck advertising.

// Mind that sometimes, the javascript: prefix gets lost when copying this somewhere. Ensure that it's still there.
javascript:(function(){window.fetch(window.location).then(function(response) {return response.text();}).then(function(responseText) {var fakeDocument = (new DOMParser()).parseFromString(responseText, "text/html");var articleContents = fakeDocument.querySelector("[data-js='post']");var prevElement = document.querySelector("[data-js='postHeader']");prevElement.parentNode.insertBefore(articleContents, prevElement.nextSibling);var veilElement = document.querySelector("#veil");veilElement.parentNode.removeChild(veilElement);document.body.classList.remove("no-scroll");});})()
(function(){
window.fetch(window.location).then(function(response) {
return response.text();
}).then(function(responseText) {
var fakeDocument = (new DOMParser()).parseFromString(responseText, "text/html");
var articleContents = fakeDocument.querySelector("[data-js='post']");
var prevElement = document.querySelector("[data-js='postHeader']");
prevElement.parentNode.insertBefore(articleContents, prevElement.nextSibling);
var veilElement = document.querySelector("#veil");
veilElement.parentNode.removeChild(veilElement);
document.body.classList.remove("no-scroll");
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment