Difference between revisions of "MediaWiki:Common.js"

From Libre Pathology
Jump to navigation Jump to search
(purge)
(enable ImageAnnotator)
 
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
/**
* ImageAnnotator
* Globally enabled
*/
// Not on Special pages, and only if viewing the page
if (mw.config.get( 'wgNamespaceNumber' ) !== -1 && $.inArray(mw.config.get('wgAction'), ['view', 'purge', 'submit']) !== -1 ) {
if (typeof ImageAnnotator_disable === 'undefined' || !ImageAnnotator_disable) {
  // Don't even import it if it's disabled.
  importScript('MediaWiki:Gadget-ImageAnnotator.js');
}
}

Latest revision as of 05:24, 5 April 2015

/* Any JavaScript here will be loaded for all users on every page load. */

/**
 * ImageAnnotator
 * Globally enabled 
 */
// Not on Special pages, and only if viewing the page
if (mw.config.get( 'wgNamespaceNumber' ) !== -1 && $.inArray(mw.config.get('wgAction'), ['view', 'purge', 'submit']) !== -1 ) {
 if (typeof ImageAnnotator_disable === 'undefined' || !ImageAnnotator_disable) {
  // Don't even import it if it's disabled.
  importScript('MediaWiki:Gadget-ImageAnnotator.js');
 }
}