Jump to content

MediaWiki:Gadget-Glamorous.js

From Wikipedia

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/**
  * Add a link to the toolbox
  * to http://toolserver.org/~magnus/glamorous.php
  * glamorous.php - global checkusage tool for files in a category or of one user
**/

/*global mw:false, jQuery:false*/
if (mw.config.get('wgNamespaceNumber') === 14) { 
 jQuery(document).ready(function(){
  'use strict';
  mw.util.addPortletLink('p-tb', "http://toolserver.org/~magnus/glamorous.php?doit=Do%20it!&category=" + 
    encodeURIComponent(mw.config.get('wgTitle').split(" ").join("_")), "GLAMorous", 'tb-glamorous', 'Check usage of files in this category');
 });
}