User:T12/common.js: Difference between revisions
Jump to navigation
Jump to search
(Start) |
(Testing a script) |
||
Line 7: | Line 7: | ||
importScript('User:Example/pagesCreated.js'); | importScript('User:Example/pagesCreated.js'); | ||
importScript('User:Example/headingEditor.js'); | importScript('User:Example/headingEditor.js'); | ||
(function(mw, $){ | |||
if (mw.config.get( 'wgNamespaceNumber' ) !== 6) return; | |||
if (mw.config.get( 'wgAction' ) != 'view') return; | |||
$( function () { | |||
var croplink = '//tools.wmflabs.org/croptool/?title=' + wgTitle; | |||
mw.util.addPortletLink( | |||
"p-tb", | |||
croplink, | |||
"CropTool", | |||
"t-crop", | |||
"Crop this image" | |||
); | |||
}); | |||
})(mediaWiki, jQuery); |