User:YesTimeToEdit/cmc/recruit

From Uncyclopedia, the content-free encyclopedia

Jump to: navigation, search
Cow Moo Cult!


Recruitment: the job and task of all faithful CMC members. The sexual and sensual art of recruitment is a hard one to master incredibly easy to get the hang of with the CMC's new recruitment .js tool!

So you're browsing round Uncyclopedia and you notice a user who's just crying out to be recruited to the CMC. What do you do? You can't just leave them a little note they'll ignore, it's got to be a big fancy template that they won't be able to miss. Something that'll really make them feel special...

...and now we have the solution. The new CMC recruitment template is sexy
(because YTTE helped make it) and weird (because Cajek helped make it) and thus it's the perfect template for hooking people.

"But inserting a template and stuff is far too laborious and hard-work-like for me!" you shout! Of course it is! So now we've got a neat .js tool (ripped from Splarka's Welcoming Committee button script). Just insert the following code into your Uncyclopedia.js and replace the text MYNAME with, well, um your user name. Then you're ready to go! The script will produce a button named "recruit" whenever you edit a user's talk page that will appear next to the "watch" and the "edit" button. Click this button once and it will automatically insert the recruitment template and then save the page. Clever huh?

//<nowiki>

function recruitbutton() {
    if(document.title.indexOf("Editing User talk:") == 0) { 
        var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
        addlilink(tabs, 'javascript:recruit()', 'recruit', 'ca-recruit');
    }
}
addOnloadHook( recruitbutton );

function recruit() {
    document.editform.wpSummary.value = 'Opportunities await you in the form of the glorious Cow Moo Cult! You have been invited to sign up!';
    document.editform.wpMinoredit.checked = false;
    document.editform.wpWatchthis.checked = true;
    var txt = document.editform.wpTextbox1;
    if(txt.value.length > 0) txt.value += '\n';
    txt.value += '{{subst:User:YesTimeToEdit/cmc/signup|MYNAME}}\n';
    // document.editform.wpSave.focus();
    document.editform.wpSave.click();
    // focus() sets focus on the save button. 
    // click() submits it automagically. 
    // Uncomment whichever you prefer -Spl
}

function addlilink(tabs, url, name, id) {
    var na = document.createElement('a');
    na.href = url;
    na.id = id;
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    li.appendChild(na);
    tabs.appendChild(li);
    return li;
}

 //
</nowiki>

Make sure you change MYNAME to your username and make sure you keep those <nowiki> tags in there. Good luck with the recruiting, soldier cow!

Personal tools
projects