User:Ohconfucius/script/flagcruft.js: Difference between revisions

Content deleted Content added
ohc_strip_flagicon
No edit summary
 
(One intermediate revision by the same user not shown)
Line 338:
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:INFOBOXFLAG|avoid flags in infoboxesFLAGRELEVANCE]]', 'appendonce');
}
 
Line 353 ⟶ 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()', 'No_FLAGICONNoFLAGICON', 'flagcruft_states', 'cruft', '', '');
 
mw.util.addPortletLink('p-tb', 'javascript:Ohc_flag_to_country()', 'FLAG->COUNTRY', 'cruft', 'cruft', '', '');