User:Mattflaschen/monster.js

// importScript('User:Gracenotes/rollback.js'); importScript('User:Lupin/recent2.js'); importScript('User:Mr.Z-man/moverevert.js'); importScript('User:Ais523/watchlistnotifier.js');

addOnloadHook(function { mw.util.addPortletLink('p-navigation','/wiki/WP:AIV','WP:AIV','t-WP:AIV','WP:AIV'); });

addOnloadHook(function { mw.util.addPortletLink('p-navigation','/wiki/Special:Log','Logs','t-Logs','Logs'); });

function aivlist(type) { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; var ip = prompt("Enter IP address", ""); var reason = prompt("Enter reason for listing", ""); t.value += "* " + reason + "--~" + "~" + "~" + "~"; f.wpSummary.value = "Listing " + ip; f.submit; } addOnloadHook( function addaivlink {  if (document.title.indexOf("Editing Wikipedia:Administrator intervention against vandalism") != -1)  {    mw.util.addPortletLink("p-cactions", "javascript:aivlist('vandal')", "vandal", "ca-vandal", "Report a vandal", "");    mw.util.addPortletLink("p-cactions", "javascript:aivlist('ipvandal')", "ipvandal", "ca-ipvandal", "Report an ipvandal", "");  } } );

importScript('User:Tra/sidebartranslate.js');

function tnaddlilink(url, name) { var na = document.createElement('a'); na.setAttribute('href', url); var txt = document.createTextNode(name); na.appendChild(txt); var li = document.createElement('li'); li.appendChild(na); return li; } function edits(number) { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "\n ~" + "~" + "~" + "~"; f.wpSummary.value = " test " ; f.submit; } function vandalism(number) { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "\n ~" + "~" + "~" + "~"; f.wpSummary.value = ""; f.submit; } function testn(number) { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += " ~" + "~" + "~" + "~"; f.wpSummary.value = " warn " + number; f.submit; }

function add_testn_tabs { var c1 = document.getElementById('column-one'); var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0]; // Only add for pages with "Editing User" somewhere in the title if (document.title.indexOf("Editing User") != -1) {     tabs.appendChild(tnaddlilink('javascript:edits("test")',"t1")); tabs.appendChild(tnaddlilink('javascript:vandalism("vandalism1")',"v1")); tabs.appendChild(tnaddlilink('javascript:vandalism("vandalism2")',"v2")); tabs.appendChild(tnaddlilink('javascript:vandalism("vandalism3")',"v3")); tabs.appendChild(tnaddlilink('javascript:vandalism("vandalism4")',"v4")); tabs.appendChild(tnaddlilink('javascript:testn("bv")',"bv")); }} addOnloadHook(add_testn_tabs); //