User:Animum/reset.js: Difference between revisions

Content deleted Content added
Animum (talk | contribs)
hmm
Animum (talk | contribs)
+comments
Line 11:
if(UrlParameters["indirect"] == '1' && wgPageName == "Wikipedia:Sandbox" && wgAction == "edit") { //If you've clicked on the toolbox link
window.setTimeout(function() { document.forms["editform"].wpDiff.click(); }, 200); //Load the diff if you are resetting it per the toolbox link
var save = confirm("Save? (click \"OK\" to save; \"cancel\" to abort)") // Do you want to make these changes?
if(save == true) {
window.setTimeout(function() { document.forms["editform"].wpSave.click(); }, 500); //Submit it!
} else { ___location.href = "javascript:history.go(-2)"; } // Go back two pages if you don't want to save it
} else {
window.setTimeout(function() { document.forms["editform"].wpSave.click(); }, 200); //Submit it!