User:Obarskyr/buttons.js

/* */ //

//**************************************************************************************// // Buttons for template-uniformisation (uniformisatie van sjablonen) from User:Gerbennn // //**************************************************************************************//

function header{ document.editform.wpTextbox1.value = "{|style=\"margin:0.5em 0 0.5em 0; clear:both;\" width=100% class=toccolours \n"+document.editform.wpTextbox1.value; document.editform.wpSummary.value = "Uniform met "; document.editform.wpMinoredit.checked = false;}

//*******************************************************************// // redirect shortcut & other handy stuff// //*******************************************************************// function categorie { insertTags("\n",""); document.editform.wpSummary.value = "+cat"; document.editform.wpMinoredit.checked = true;}

//*******************************************************************// // marking articles // //*******************************************************************//

//*******************************************************************// // anonymous user messages // //*******************************************************************// function test0 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + test0"; document.editform.wpMinoredit.checked = false;}

function test { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + test"; document.editform.wpMinoredit.checked = false;}

function test2 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + test2"; document.editform.wpMinoredit.checked = false;}

function test3 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + test3"; document.editform.wpMinoredit.checked = false;}

function test4 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + test4"; document.editform.wpMinoredit.checked = false;}

function blank { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + blank"; document.editform.wpMinoredit.checked = false;}

function blank2 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + blank2"; document.editform.wpMinoredit.checked = false;}

function blank3 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + blank3"; document.editform.wpMinoredit.checked = false;}

function blank4 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + blank4"; document.editform.wpMinoredit.checked = false;}

function blatantvandal { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + blatantvandal"; document.editform.wpMinoredit.checked = false;}

function mess2 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + mess2"; document.editform.wpMinoredit.checked = false;}

function behave { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + behave"; document.editform.wpMinoredit.checked = false;}

function funnybut { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + funnybut"; document.editform.wpMinoredit.checked = false;}

function seriously { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + seriously"; document.editform.wpMinoredit.checked = false;}

function obscene { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n --~ "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + obscene"; document.editform.wpMinoredit.checked = false;}

function blokrequest { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +" "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + ADMINS blokrequest"; document.editform.wpMinoredit.checked = false;}

function alert { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value +"\n "; document.editform.wpSummary.value = document.editform.wpSummary.value + " + alert"; document.editform.wpMinoredit.checked = false;}

//*******************************************************************// //*******************************************************************// //*******************************************************************// // Event functions // //*******************************************************************//

// Add the buttons to the page // function addButtons { str = " <input type=button value=Alert onclick=\"alert\" class=subbutt>";

if(location.href.match(/User:/)) { str = "<input type=button value=test0 onclick=\"test0\" class=subbutt><input type=button value=test onclick=\"test\" class=subbutt><input type=button value=\"test2\" onclick=\"test2\" class=subbutt><input type=button value=\"test3\" onclick=\"test3\" class=subbutt><input type=button value=\"test4\" onclick=\"test4\" class=subbutt><input type=button value=Blank onclick=\"blank\" class=subbutt><input type=button value=Blank2 onclick=\"blank2\" class=subbutt><input type=button value=Blank3 onclick=\"blank3\" class=subbutt><input type=button value=Blank4 onclick=\"blank4\" class=subbutt><input type=button value=Blatantvandal (4) onclick=\"blatantvandal\" class=subbutt><input type=button value=mess2 (2) onclick=\"mess2\" class=subbutt><input type=button value=behave (2) onclick=\"behave\" class=subbutt><input type=button value=funnybut(3) onclick=\"funnybut\" class=subbutt><input type=button value=seriously(3) onclick=\"seriously\" class=subbutt><input type=button value=obscene(3) onclick=\"obscene\" class=subbutt><input type=button value=BLOCKREQUEST onclick=\"blokrequest\" class=subbutt><input type=button value=Alert onclick=\"alert\" class=subbutt>"; } document.getElementById("editpage-copywarn").innerHTML="<form action=\"\">"+str+" "+document.getElementById("editpage-copywarn").innerHTML; return false; }

//*******************************************************************// // Declare events // //*******************************************************************// if(location.href.match(/action=(edit)|(submit)/)) { if (window.addEventListener) { window.addEventListener("load", addButtons, false); } else if (window.attachEvent) { window.attachEvent("onload", addButtons); } }

//