Jump to content

User:Mattflaschen/CommonsHelper Labs.js

From Wikipedia, the free encyclopedia
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' )
{
   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 );
}