Content deleted Content added
Ohconfucius (talk | contribs) disabling wmbledon buttons |
Ohconfucius (talk | contribs) add regex to function Ohc_flagicon_to_flagathlete |
||
Line 335:
}
function Ohc_flagicon_to_flagathlete(){
//Add a tag to the summary box
// regex(/(\|[ ]*)(\{\{\s*flag(?:icon|)\|(?:[^{}]+|)\}\})[ ]*(\{\{\s*flag(?:icon|)\|(?:[^{}]+|)\}\})[ ]*(\[\[[-–'é\w ]+\|)((?:1\d\d|20[0-2])\d\]\])/gi, '$1$4$2/$3 $5'); // curing Easter egg
// regex(/(\{\{\s*flag(?:icon|)\|(?:[^{}]+|)\}\})[ ]*((?:\'\'\'?|)\[\[[-–'é\w ]+\|)((?:1\d\d|20[0-2])\d\]\])/gi, '$2$1 $3'); // curing Easter egg
regex(/\{\{flag\s?icon\s?\|/gi, '{{flagathlete|');
// ohc_flagcruft();
setreason('More appropriate flag', 'appendonce');
}
function ohc_flagcruft_driver(){
//Add a tag to the summary box
Line 347 ⟶ 355:
// mw.util.addPortletLink('p-tb', 'javascript:ohc_flagwimbledon2()', 'FLAGWIMBLEDON', 'use template with country identifier', 'cruft', '', '');
mw.util.addPortletLink('p-tb', 'javascript:Ohc_flag_to_country()', 'FLAG->COUNTRY', 'cruft', 'cruft', '', '');
mw.util.addPortletLink('p-tb', 'javascript:Ohc_flagicon_to_flagathlete()', 'FLAGICON->FLAGATHLETE', 'cruft', 'cruft', '', '');
}
|