User:Bawolff/how to use MikeSofaer's anti-SOPA js with MediaWiki

There's lots of talk of blacking out sites to protest SOPA. Wikipedia is planning to have a giant banner, and Varnet is planning to make an extension to allow other mediawiki users to easily to join in the protest.

Another js black out app that some sites are using is here: http://mikesofaer.github.com/stop_censorship/

This can easily be installed on MediaWiki wikis, even if you don't have access needed to install extensions (You only need "Admin" or "Sysop" level access)

Note, these instructions are just adapted from. I do not deserve any credit for this at all, this is all other people's work.

Method 1 (In Common.js)
This is perhaps the more proper way in many regards.
 * Go to the page Mediawiki:Common.js
 * Add to the bottom of the page:
 * Hit save.

Downside to this method, is that (on older MediaWiki) users who have visited your site recently may have to do a hard refresh (ctrl+r) before seeing the censorship app. This is particularly a problem in older (pre 1.17) versions of MediaWiki, where it could be worked around by increasing $wgStyleVersion. In newer mediawiki this is less of an issue as RL is smarter about how js is cached, and js changes should take affect after about 5 minutes in general.

Method 2 (In the copyright message)

 * Go to the page MediaWiki:copyright on your wiki.
 * Edit (or create that page if it doesn't exist already), adding the following to the bottom:
 * Hit save.

The downside to this approach, is this won't work on any special pages (like Special:Recentchanges). Depending on the caching strategy your website uses (in particular if it uses Squid cache or File cache) it may not show up for anonymous users [not a whole lot we can do about that, short of removing all the entries in the cache]. As an aside, some wiki hosts change where this message is located (for example, Wikimedia uses MediaWiki:Wikimedia-copyright instead). Additionally this method will only work if your wiki is set up to specify a license.

Other things you can do
The page MediaWiki:Sitenotice is included on all pages. You cannot put javascript in that page, but you can put arbitrary wikitext in there to display on all pages.