User:Ɱ/common.js
< User:Ɱ
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
The accompanying .css page for this skin can be added at User:Ɱ/common.css. |
if (mw.config.get('wgNamespaceNumber') === 14) {
$(function () {
// upload in cat
mw.util.addPortletLink('p-cactions', '//commons.wikimedia.org/w/index.php?title=Special:UploadWizard&categories=' + encodeURIComponent(mw.config.get('wgTitle')), 'Upload to this category', 'UW');
$("#contentSub").prepend(
'<a href="//commons.wikimedia.org/w/index.php?title=Special:UploadWizard&categories=' + encodeURIComponent(mw.config.get('wgTitle')) +
'" title="Upload to this category">' +
'<img alt="Upload to this category" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/Camera-photo_Upload.svg/30px-Camera-photo_Upload.svg.png"' +
' style="vertical-align:sub" height="30" width="30">' +
'</a>');
});
}
mw.loader.load('//fr.wikipedia.org/w/index.php?title=Mediawiki:Gadget-KartoEditor.js&action=raw&ctype=text/javascript');