User:Peteforsyth/global.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* see meta.wikimedia.org/wiki/User:Hedonil/XTools */
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hedonil/XTools/XTools.js&action=raw&ctype=text/javascript');

// 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 );
}

// Turn off Media Viewer globally
mw.config.set("wgMediaViewerOnClick", false);