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:26, 25 January 2015 (Superm401 moved page User:Superm401/CH2.js to User:Superm401/CommonsHelper Labs.js without leaving a redirect). 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.
// CommonsHelper Helper (CH²) by Krimpet
// Released into the public domain
 
if ( mw.config.get( 'wgCanonicalNamespace' ) == 'File' && mw.config.get( 'wgAction' ) == 'edit' )
{
   //var page = 'User:Krimpet/CH2.js';
   var page = 'User:Superm401/CH2.js';

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