Jump to content

User:Mattflaschen/CommonsHelper Labs.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mattflaschen (talk | contribs) at 03:28, 25 January 2015 (remove comment). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// Loader script for CommonsHelper Labs (originally by Krimpet, updated by Superm401)
// Released into the public domain
 
if ( mw.config.get( 'wgCanonicalNamespace' ) == 'File' && mw.config.get( 'wgAction' ) == 'edit' )
{
   var page = 'User:Superm401/CommonsHelper Labs.js';

   var url = '//commons.wikimedia.org/w'
             + '/index.php?title='
             + encodeURIComponent( page.replace( / /g, '_' ) )
             + '&action=raw&ctype=text/javascript';
   mw.loader.load( url );
}