User:Dl2000/vector.js

importScript('User:Dl2000/monobook.js');

// importScript('User:Ohconfucius/script/EngvarB.js'); //User:Ohconfucius/script/EngvarB.js

// initialize the array - only do this once var extraPopupFilters = []; // define the function function popupUseDmy (wikiText) { if (/use dmy dates/i.test(wikiText)) return '&lt;dmy&gt;'; if (/use mdy dates/i.test(wikiText)) return '&lt;mdy&gt;'; else return ''; };

function popupUseEn (wikiText) { var enmsg = '';

if (/use british english/i.test(wikiText)) enmsg = '&lt;en-gb&gt;'; if (/use british (oxford) english/i.test(wikiText)) enmsg = '&lt;en-gbOx&gt;'; if (/use australian english/i.test(wikiText)) enmsg = enmsg + '&lt;en-au&gt;'; if (/use new zealand english/i.test(wikiText)) enmsg = enmsg + '&lt;en-nz&gt;'; if (/use canadian english/i.test(wikiText)) enmsg = enmsg + '&lt;en-ca&gt;'; if (/use south african english/i.test(wikiText)) enmsg = enmsg + '&lt;en-za&gt;'; if (/use jamaican english/i.test(wikiText)) enmsg = enmsg + '&lt;en-ja&gt;'; if (/use irish english/i.test(wikiText)) enmsg = enmsg + '&lt;en-ie&gt;'; if (/use indian english/i.test(wikiText)) enmsg = enmsg + '&lt;en-in&gt;'; if (/use pakistani english/i.test(wikiText)) enmsg = enmsg + '&lt;en-pk&gt;'; if (/use hong kong english/i.test(wikiText)) enmsg = enmsg + '&lt;en-hk&gt;'; if (/use scottish english/i.test(wikiText)) enmsg = enmsg + '&lt;en-sc&gt;'; if (/use singapore english/i.test(wikiText)) enmsg = enmsg + '&lt;en-sg&gt;'; if (/use nigerian english/i.test(wikiText)) enmsg = enmsg + '&lt;en-ng&gt;'; if (/use american english/i.test(wikiText)) enmsg = enmsg + '&lt;en-us&gt;'; if (/engvarb/i.test(wikiText)) enmsg = enmsg + '&lt;en-B&gt;';

return enmsg; };

function popupDelWarn (wikiText) { if (/{{Proposed deletion/i.test(wikiText)) return '!prod!'; else return ''; } // add the function to the array (you can repeat this for lots of functions) extraPopupFilters.push(popupUseDmy); extraPopupFilters.push(popupUseEn); extraPopupFilters.push(popupDelWarn);

importScript('User:Shubinator/DYKcheck.js'); //DYKcheck tool