Skip to content

Instantly share code, notes, and snippets.

@mathiasbynens
Created January 18, 2012 07:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mathiasbynens/1631807 to your computer and use it in GitHub Desktop.
Save mathiasbynens/1631807 to your computer and use it in GitHub Desktop.
Userscript that removes the SOPA overlay on English Wikipedia
// ==UserScript==
// @name Disable the SOPA overlay on English Wikipedia
// @author Mathias Bynens <http://mathiasbynens.be/>
// @match http://en.wikipedia.org/*
// ==/UserScript==
// http://mths.be/unsafewindow
window.unsafeWindow || (
unsafeWindow = (function() {
var el = document.createElement('p');
el.setAttribute('onclick', 'return window;');
return el.onclick();
}())
);
unsafeWindow.jQuery('#siteNotice, #mw-sopaOverlay').remove().end().add('#content').show();
@mathiasbynens
Copy link
Author

Click the “raw” link to install it.

There are a few other ways to circumvent the blackout: https://meta.wikimedia.org/wiki/English_Wikipedia_SOPA_blackout/Technical_FAQ#Are_there_ways_to_circumvent_the_read_blackout.3F


Disclaimer: Wikipedia is taking part in The Great Interwebs Blackout of 2012. The point of this blackout is to inform people about SOPA/PIPA and to spread awareness about the protest against it. That’s wonderful!

However, if you already know about SOPA/PIPA, there should be no reason you can’t use the English Wikipedia today. Hence this userscript.

Please donate to Wikipedia: http://donate.wikimedia.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment