User:Hgetnet/commonsmover.js

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