/* 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>