User:The dark prince/uncyclopedia.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes.
- Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
- Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
- Opera, Konqueror and Safari users can just click the Reload button.
- Chrome: press Ctrl+F5 or Shift+F5
//<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|The dark prince}}\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>