User:AFigureOfBlue/movetocommons.js

/* Based on User:Where next Columbus?/commonsmover.js by User:Where next Columbus? and on User:2D/commonsmover.js by User:2D, User:Closedmouth and User:TheDJ. */ $(function { if (wgNamespaceNumber === 6 && jQuery.inArray("All free media", wgCategories) !== -1) {  mw.util.addPortletLink('p-cactions', 'javascript:void wp_user_script.movetocommons;','Move to Commons','','Move file to Commons using CommonsHelper');  } });

if (!wp_user_script) { var wp_user_script = {}; }

wp_user_script.movetocommons = function { movetocommons_window = window.open('http://toolserver.org/~magnus/commonshelper.php?interface=en&directupload=1&remove_categories=1&image=' + encodeURIComponent(wgTitle) + '&lang=en&username=' + encodeURIComponent(wgUserName) + '&tusc_user=' +  encodeURIComponent(wgUserName)); };