User:Casper2k4/monobook.js

mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s'); function addlilink(tabs, url, name, id, title, key){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) {       if(key && title) {           ta[id] = [key, title]; }       else if(key) {           ta[id] = [key, '']; }       else if(title) {           ta[id] = ['', title]; }   }    // re-render the title and accesskeys from existing code in wikibits.js    akeytt; return li; }

function addTab(url, name, id, title, key){ var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; return addlilink(tabs, url, name, id, title, key); }

$(function { if (document.title.indexOf("User:") != -1) {

document.getElementById('siteSub').innerHTML = 'From Wikipedia, the free encyclopedia[<' + 'a href="javascript:speedyButton"><' + 'u>Speedy Delete<' + '/u><' + '/a>]<' + 'br>';

addTab("javascript:speedyButton", "speedy delete", "ca-db0", "Pick a Speedy Deletion template to put on this article.", "1"); addTab("javascript:artnoticeButton", "article notice", "ca-db0", "Pick an Article Notice to put on this article.", ""); addTab("javascript:userwarningButton", "user warning", "ca-db0", "Issue this user with a warning.", ""); addTab("javascript:usergeninfoButton", "general info", "ca-db0", "Give this user a general information message.", ""); }

if (document.title.indexOf("User:") != 0 &&document.title.indexOf("User talk") != 0 && document.title.indexOf("Editing ") != 0 && document.URL.search(/\?/) == -1 && document.title.indexOf("Image:") != 0 ) {

document.getElementById('siteSub').innerHTML = 'From Wikipedia, the free encyclopedia[<' + 'a href="javascript:speedyButton"><' + 'u>Speedy Delete<' + '/u><' + '/a>]<' + 'br>';

addTab("javascript:speedyButton", "speedy delete", "ca-db0", "Pick a Speedy Deletion template to put on this article.", "1"); addTab("javascript:artnoticeButton", "article notice", "ca-db0", "Pick an Article Notice to put on this article.", ""); }

if (document.title.indexOf("Image:") != -1) { addTab("javascript:easyDbImgNoSource", "no source", "ca-db0", "Report this image as having no source", ""); addTab("javascript:easyDbImgNoCopyright", "no copyright", "ca-db0", "Report this image as having no copyright", ""); }

if (document.title.indexOf("Editing User talk:") != -1) { addTab("javascript:userwarningButton", "user warn", "ca-db0", "Issue this user with a warning.", ""); addTab("javascript:otheruserwarnButton", "other warn", "ca-db0", "Give this user a warning.", ""); addTab("javascript:usergeninfoButton", "info", "ca-db0", "Give this user a general information message.", ""); addTab("javascript:userwelcomeButton", "welcome", "ca-db0", "Give this user a welcome message.", ""); } });

document.write(' ');