Jump to content

User:Animum/reset.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Animum (talk | contribs) at 22:53, 8 August 2007 (Created page with '//<pre><nowiki> function addText() { document.editform.wpTextbox1.value = "{{Please leave this line alone (sandbox heading)}}\n" + "<!-- Hello! Please try out y...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<pre><nowiki>
function addText() {
    document.editform.wpTextbox1.value = "{{Please leave this line alone (sandbox heading)}}\n" + "<!-- Hello! Please try out your editing/formatting skills below this line. As this page is for editing purposes, it will be cleaned periodically. -->";
    document.editform.wpSummary.value = "Reset sandbox ([[User:Magnus animum/reset.js|JS EDIT]])"
    document.editform.wpMinoredit.checked = false;
    document.editform.save();
}

function addResetTab() {
    if( wgTitle == "Sandbox" && wgNamespaceNumber == "4" ) {
        addPortletLink('p-cactions', 'javascript:addText()', 'ca-reset', "Reset the sandbox"); }
}

addOnloadHook(addResetTab);
//</nowiki></pre>