Content deleted Content added
Ohconfucius (talk | contribs) Undid revision 1295914009 by Ohconfucius (talk) |
Ohconfucius (talk | contribs) No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 321:
// regex(/(\|[ ]*)(\{\{\s*[Ff]lag(?:icon|)\|(?:[^{}]+|)\}\})[ ]*(\{\{\s*flag(?:icon|)\|(?:[^{}]+|)\}\})[ ]*(\[\[[-–'é\w ]+\|)((?:1\d\d|20[0-2])\d\]\])/gi, '$1$4$2/$3 $5'); // curing Easter egg
// regex(/(\{\{\s*[Ff]lag(?:icon|)\|(?:[^{}]+|)\}\})[ ]*((?:\'\'\'?|)\[\[[-–'é\w ]+\|)((?:1\d\d|20[0-2])\d\]\])/gi, '$2$1 $3'); // curing Easter egg
regex(/{{[Ff]lagicon\|([^}(|]+)(?: \((?:U\. ?S\. |US
regex(/\{\{
regex(/\{\{Flagicon\|[^}(|]+(?:\|\d+|)\}\}\s*(\'{0,3})\s*\[\[(
regex(/\{\{(?:[Ff]lag(?:country|u?)\|\s*([^{}|]*)(?:\|\d{4}|))\}\}/gi, '$1');
regex(/\{\{(?:[Ff]lag(?:country|u?)\|\s*([^{}|]*)(?:\|\d{4}|))\}\}/gi, '$1');
// regex(/\{\{(?:[Ff]lag(?:country|u?)\|\s*([^{}|]*))\}\}/
//
// \{\{Flagicon\|[^\}]+(?:\|\d+|)\}\}\s*(\'{0,3})\s*\[\[([^{}'|]*\||)([\w\s]+)\]\]\s*(\'{0,3})
// \{\{Flagicon\|[^}(|]+(?:\|\d+|)\}\}\s*(\'{0,3})\s*\[\[Georgia \(U.S. state\)\|(Georgia)\]\]''
regex(/\[\[(Mar-a-Lago)\]\]/gi, '$1');
regex(/\[\[(?:(?:West |)Palm Beach), Florida\|([A-Za-z\s]+)\]\]/gi, '$1');
setreason('per [[MOS:FLAGRELEVANCE]]', 'appendonce');
}
function ohc_strip_flagicon(){
//Add a tag to the summary box
regex(/\{\{(?:[Ff]lag(?: ?icon)\|\s*([^{}|]*)(?:\|\d{4}|))\}\}\s*/gi, '');
regex(/(\! width=)550(\|Details)/gi, '$1700$2');
setreason('per [[MOS:FLAGRELEVANCE]]', 'appendonce');
}
Line 337 ⟶ 354:
mw.util.addPortletLink('p-tb', 'javascript:ohc_flagcruft_driver()', 'FLAGCRUFT', 'cruft', 'cruft', '', '');
mw.util.addPortletLink('p-tb', 'javascript:Ohc_US_states_driver()', 'FLAGRELEVANCE', 'flagcruft_states', 'cruft', '', '');
mw.util.addPortletLink('p-tb', 'javascript:ohc_strip_flagicon()', 'NoFLAGICON', 'flagcruft_states', 'cruft', '', '');
mw.util.addPortletLink('p-tb', 'javascript:Ohc_flag_to_country()', 'FLAG->COUNTRY', 'cruft', 'cruft', '', '');
|