User:Arabani/monobook.js

/* */ wpUserName  = 'Arabani'; wpShowImages = true; mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js&action=raw&ctype=text/javascript');

window.onload = Main;

function Main { LivePreviewInstall; addpurge; morelinks; addtoolboxlinks; }

// User:Lupin/popups.js

mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s'); popupFixRedirs = true; popupFixDabs = true; popupRevertSummaryPrompt = true; popupFixDabsSummary = "Disambig fix from %s to %s using popups";

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; }

function addpurge { ta['ca-purge'] = ['g', 'Purge the internal cache for this page']; if(!document.getElementById) return; var x = document.getElementById('ca-history'); var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; if(!x) return; if(x.children) x = x.children[0]; else x = x.childNodes[0]; addlilink(tabs, x.href.replace(/=history/, "=purge"), 'purge', 'ca-purge'); }

function morelinks { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; if(document.title.indexOf("Editing ") == 0) addlilink(tabs, 'javascript:replace', 'replace', ''); if(document.title.indexOf("Editing Image:") == 0) addlilink(tabs, 'javascript:unverified', 'tag', ''); if(document.title.indexOf("Editing User talk:") == 0) { addlilink(tabs, 'javascript:vandal("welcome", "welcome")', 'w', ''); addlilink(tabs, 'javascript:vandal("test", "test warning")', '1', ''); addlilink(tabs, 'javascript:vandal("test2", "test2 warning")', '2', ''); addlilink(tabs, 'javascript:vandal("test2a", "test2a warning")', '2a', ''); addlilink(tabs, 'javascript:vandal("test3", "test3 warning")', '3', ''); addlilink(tabs, 'javascript:vandal("test4", "test4 warning")', '4', ''); addlilink(tabs, 'javascript:vandal("test5", "test5 warning")', '5', ''); addlilink(tabs, 'javascript:vandal("spam", "spam warning")', 's1', ''); addlilink(tabs, 'javascript:vandal("spam2", "spam2 warning")', 's2', ''); addlilink(tabs, 'javascript:vandal("spam3", "spam3 warning")', 's3', ''); addlilink(tabs, 'javascript:vandal("spam4", "spam4 warning")', 's4', ''); } }

function replace { var s = prompt("Search regexp?"); if(s) { var r = prompt("Replace regexp?"); if(!r && r != '') return; var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(s, "g"), r); } }

function vandal(tmplt, editsum) { var txt = document.editform.wpTextbox1; if(txt.value.length > 0) txt.value += '\n'; txt.value += ' --~'; txt.focus; txt = document.editform.wpSummary; txt.value = 'Added ' + editsum + ' message.'; document.editform.wpWatchthis.checked = false; }

function addtoolboxlinks { var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; addlilink(tb, '/wiki/Template:TestTemplates', 'Test Templates', ''); }

/* */

/* This is to keep track of who is using the Live Preview: User:Pilaf/livepreview.js */