User:Ebe123/MtC.js

function movetocommons { var url="http://toolserver.org/~magnus/commonshelper.php?interface=en&image=" + encodeURIComponent( wgTitle ) + "&lang=en&directupload=1&username=" + encodeURIComponent( wgUserName ); window.open(url); } function start { if(wgCanonicalNamespace == "Image" || wgCanonicalNamespace == "File" || wgCanonicalNamespace == "Media" ) { addPortletLink("p-cactions","javascript:movetocommons","move to commons","ca-mcom"); } } addOnloadHook(start);