User:Jj137/quickwarn.js

//

function one { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "" + " " + "" + '\n' + ":If this is a shared IP address, and you didn't make any unconstructive edits, consider creating an account for yourself so you can avoid further irrelevant warnings."; f.wpSummary.value = "Notice: Vandalism."; document.getElementById('editform').submit; }

function two { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "" + " " + "" + '\n' + ":If this is a shared IP address, and you didn't make any unconstructive edits, consider creating an account for yourself so you can avoid further irrelevant warnings."; f.wpSummary.value = "Caution: Vandalism."; document.getElementById('editform').submit; }

function three { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "" + " " + "" + '\n' + ":If this is a shared IP address, and you didn't make any unconstructive edits, consider creating an account for yourself so you can avoid further irrelevant warnings."; f.wpSummary.value = "Warning: Vandalism."; document.getElementById('editform').submit; }

function four { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "" + " " + "" + '\n' + ":If this is a shared IP address, and you didn't make any unconstructive edits, consider creating an account for yourself so you can avoid further irrelevant warnings."; f.wpSummary.value = "Final warning for vandalism."; document.getElementById('editform').submit; }

function fourim { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "" + " " + "" + '\n' + ":If this is a shared IP address, and you didn't make any unconstructive edits, consider creating an account for yourself so you can avoid further irrelevant warnings."; f.wpSummary.value = "Only warning for Vandalism."; document.getElementById('editform').submit; }

function blocked { var f = document.editform, t = f.wpTextbox1; var expiry = prompt("Expiry?"); if (expiry == null){ return; } else { if (t.value.length > 0) t.value += '\n'; t.value += "" + '\n' + ":If this is a shared IP address, and you didn't make any unconstructive edits, consider creating an account for yourself so you can avoid further irrelevant warnings."; f.wpSummary.value = "You have been blocked from editing for " + expiry + " due to repeated vandalism."; document.getElementById('editform').submit; } }

function tabs { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing User talk:1") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } if (document.title.indexOf("Editing User talk:2") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } if (document.title.indexOf("Editing User talk:3") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } if (document.title.indexOf("Editing User talk:4") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } if (document.title.indexOf("Editing User talk:5") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } if (document.title.indexOf("Editing User talk:6") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } if (document.title.indexOf("Editing User talk:7") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } if (document.title.indexOf("Editing User talk:8") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } if (document.title.indexOf("Editing User talk:9") != -1) {     mw.util.addPortletLink('p-cactions', 'javascript:one', "1"); mw.util.addPortletLink('p-cactions', 'javascript:two', "2"); mw.util.addPortletLink('p-cactions', 'javascript:three', "3"); mw.util.addPortletLink('p-cactions', 'javascript:four', "4"); mw.util.addPortletLink('p-cactions', 'javascript:fourim', "4im"); mw.util.addPortletLink('p-cactions', 'javascript:blocked', "block"); } }

addOnloadHook(tabs);

//end antivandal script

//