MediaWiki:Replaceuploadlink.js
Jump to navigation
Jump to search
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.
Documentation for this user script can be added at MediaWiki:Replaceuploadlink. |
// <source lang="javascript">
/* Replaces the default upload link in the menu. Instead of linking to [[Commons:Upload]]
it will link to
http://commons.wikimedia.org/w/index.php?title=Special:Upload&uselang=experienced . */
$(document).ready(function() {
var u = document.getElementById('n-uploadbtn');
if ( !u ) return;
var a = u.getElementsByTagName("a")[0];
if ( !a ) return;
a.href = mw.config.get( 'wgScript' ) + '?title=Special:Upload&uselang=experienced';
});
//</source>