MediaWiki:Gadget-AddInformation.js
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.
/* global mw, $ */
// <nowiki>
( function () {
'use strict';
if ( mw.config.get( 'wgNamespaceNumber' ) === 6 && $.inArray( mw.config.get( 'wgAction' ), [ 'view', 'purge' ] ) !== -1 && !document.querySelector( '#mw-imagepage-content div.commons-file-information-table' ) ) {
$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).done( function () {
mw.util.addPortletLink( 'p-tb', 'https://add-information.toolforge.org/?image=' + encodeURIComponent( mw.config.get( 'wgTitle' ).replace( ' ', '_' ) ),
'Add {{Information}}', 't-addInfo', null );
} );
}
}() );
// </nowiki>