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.
varfunctionName=mw.util.getParamValue("function");functionuniversal_replace(){if(wgPageName=='User_talk:CommonsDelinker/commands'||wgPageName=='User_talk:CommonsDelinker/commands'){varold_image=mw.util.getParamValue("oldimage").replace(/_/g,' ');if(old_image===null){old_image=prompt('What is the name of the old image (without: "File:")');}varnew_image=mw.util.getParamValue("newimage").replace(/_/g,' ');if(new_image===null){new_image=prompt('What is the name of the new image (without: "File:")');}varreason=mw.util.getParamValue("replace_reason").replace(/_/g,' ');if(reason===null){reason='';}document.editform.wpTextbox1.value+='{{universal replace|'+old_image+'|'+new_image+'|reason='+reason+'}}';document.editform.wpSummary.value='universal replace: [[:File:'+old_image+']] → [[:File:'+new_image+']] ('+reason+')';if(typeofwindow.DelinkerSave=="undefined"){document.editform.wpDiff.click();}else{document.editform.wpSave.click();}}}functionmove_cat(){varoldcat=decodeURI(mw.util.getParamValue("oldcat")).replace(/_/g,' ');varnewcat=decodeURI(mw.util.getParamValue("newcat")).replace(/_/g,' ');if(wgPageName=='User_talk:CommonsDelinker/commands'){document.editform.wpTextbox1.value+='{{move cat|'+oldcat+'|'+newcat+'}}';document.editform.wpSummary.value='Adding move cat: [[:Category:'+oldcat+']] → [[:Category:'+newcat+']]';document.editform.wpDiff.click();}}for(varkeyinwgUserGroups){if(wgUserGroups[key]=='autoconfirmed'&&functionName=='replace'){$(universal_replace);}elseif(wgUserGroups[key]=='autoconfirmed'&&functionName=='movecat'){$(move_cat);}}//</source>