User:SzMithrandir/commonsmover.js

function movetocommons { var url="http://bots.wmflabs.org/~richs/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") { mw.util.addPortletLink("p-cactions","javascript:movetocommons","move to commons","ca-mcom"); } }

$(start);