Jump to content

User:MacGyverMagic/welcome.js

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by MacGyverMagic (talk | contribs) at 14:31, 21 July 2006 (split from main monobook.js). The present address (URL) is a permanent link to this version.
(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.
 // A small piece of JS writen by [[User:MatthewFenton]], his first piece of JS.
function welcome() {
        if (document.title.indexOf('Editing User talk:') == 0) {
                document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + '==' + 'Welcome' + '==\n' + '{{subst:User:' + 'MacGyverMagic/Welcome}}\n~~' + '~~';
                document.editform.wpSummary.value = 'Welcome a user to Wikipedia using JS WW';
        }
}
function welcome_tab() {
                add_link('javascript:welcome()', 'Welcome');
}

if (document.title.indexOf('Editing User talk:') == 0) {
        addOnloadHook(welcome_tab);
}