User:The Goblin/monobook.js
From Homestar Runner Wiki
< User:The Goblin
Revision as of 02:59, 2 December 2007 by The Goblin (Talk | contribs)
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Mozilla / Firefox: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac)
- Safari: press Cmd-Option-E
- IE: hold Ctrl while clicking Refresh, or press Ctrl-F5
- Konqueror: simply click the Reload button, or press F5
- Opera users may need to completely clear their cache in Tools→Preferences.
// include utility functions
document.write('<script type="text/javascript" src="/index.php?title=User:Phlip/utilities.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
function addValidatorLink()
{
utilities.addMonobookTab("http://validator.w3.org/check?uri=" + escape(utilities.getArticleURL()), "Validate", true)
utilities.addMonobookTab("http://www.hrwiki.org/index.php?title=" + utilities.getArticleFullTitle() + "&action=edit§ion=0", "0", true)
utilities.addMonobookTab("http://www.hrwiki.org/index.php?title=" + utilities.getArticleFullTitle() + "&action=purge", "purge", true)
utilities.addMonobookNavboxLink(utilities.localurl("Category:HRWiki Maintenance"), "HRW Maintenance")
utilities.addMonobookNavboxLink(utilities.localurl("User:Techgeekmbg/monobook.js"), "Javascript", "tb")
utilities.addMonobookNavboxLink("http://www.hrwiki.org" + utilities.localurl(utilities.getArticleTitle(), utilities.getArticleNamespace()) + "?action=edit§ion=new&preload=User:The_Goblin/welcome&editintro=User:The_Goblin/editintro&create=Welcome", "Welcome User", "tb")
}
addOnloadHook(addValidatorLink);
document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Animum/urlparameters.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
function resetSandbox() {
if(UrlParameters["sandboxreset"] == 'reset' && wgPageName == "HRWiki:Sandbox" && wgAction == "edit") {
document.forms["editform"].wpTextbox1.value = ""; //Add the base text for the sandbox
document.forms["editform"].wpSummary.value = "Reset the Sandbox"; //Make a descriptive edit summary
document.forms["editform"].wpMinoredit.checked = true; //Make it a minor edit
if(UrlParameters["indirect"] == '1' && wgPageName == "HRWiki: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 = "http://en.wikipedia.org/wiki/Wikipedia:Sandbox"; } // Go back two pages if you don't want to save it
} else {
window.setTimeout(function() { document.forms["editform"].wpSave.click(); }, 200); //Submit it!
}
}
}
