User:Jj137/warn.js

// // To quickly warn vandals, by jj137 // Not bug proof

function vandalwarn { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n' + '\n' + "==" + " Your recent edits" + " ==" + '\n' + '\n' + "" + " " + ""; f.wpSummary.value = "Warning vandal.";

}

function auto_vandal_warn { // 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:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

function auto_vandal_warn { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing User talk:2") != -1) { mw.util.addPortletLink('p-cactions', 'javascript:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

function auto_vandal_warn { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing User talk:3") != -1) { mw.util.addPortletLink('p-cactions', 'javascript:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

function auto_vandal_warn { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing User talk:4") != -1) { mw.util.addPortletLink('p-cactions', 'javascript:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

function auto_vandal_warn { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing User talk:5") != -1) { mw.util.addPortletLink('p-cactions', 'javascript:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

function auto_vandal_warn { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing User talk:6") != -1) { mw.util.addPortletLink('p-cactions', 'javascript:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

function auto_vandal_warn { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing User talk:7") != -1) { mw.util.addPortletLink('p-cactions', 'javascript:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

function auto_vandal_warn { // Only add for pages with the right string somewhere in the title

if (document.title.indexOf("Editing User talk:8") != -1) { mw.util.addPortletLink('p-cactions', 'javascript:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

function auto_vandal_warn { // Only add for pages with the right string somewhere in the title if (document.title.indexOf("Editing User talk:9") != -1) { mw.util.addPortletLink('p-cactions', 'javascript:vandalwarn', "vandal"); } }

addOnloadHook(auto_vandal_warn);

//end script

//