User:Sanglahi86/test.js

/** * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor. * @see https://meta.wikimedia.org/wiki/TemplateScript * @update-token */ // 	$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function {	pathoschild.TemplateScript.add([ {			name: 'PH refs fix', script: function(editor) { editor .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?officialgazette\.gov\.ph\/?/gi, '$1work=Official Gazette of the Republic of the Philippines') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?pna\.gov\.ph\/?/gi, '$1work=Philippine News Agency') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?pia\.gov\.ph\/news\/?/gi, '$1work=Philippine Information Agency') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *interaksyon\.philstar\.com\/?/gi, '$1work=Interaksyon') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:(?:newsinfo\.)?(?:\[\[)?INQUIRER(?:\.net\/?(?:\]\])?)?)/gi, '$1newspaper=Philippine Daily Inquirer') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:(?:www\.)?(?:\[\[)?philstar(?:\.com\/?(?:\]\])?)?)/gi, '$1work=The Philippine Star') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:(?:www\.)?mb\.com\.ph\/?)/gi, '$1work=Manila Bulletin') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:(?:www\.)?(?:\[\[)?manilatimes(?:\.net\/?(?:\]\])?)?)/gi, '$1work=The Manila Times') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *news\.abs-cbn(?:\.com\/?)?/gi, '$1work=ABS-CBN News') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?gmanetwork\.com\/news\/?/gi, '$1work=GMA News Online') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?cnnphilippines\.com\/?/gi, '$1work=CNN Philippines') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?rappler\.com\/?/gi, '$1work=Rappler') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?bworldonline\.com\/?/gi, '$1work=BusinessWorld') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?businessmirror\.com\.ph\/?/gi, '$1work=BusinessMirror') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?manilastandard\.net\/?/gi, '$1work=Manila Standard') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?sunstar\.com\.ph\/?/gi, '$1work=SunStar') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?tribune\.net\.ph\/?/gi, '$1work=Daily Tribune') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?malaya\.com\.ph\/?/gi, '$1work=Malaya') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?mindanews\.com\/?/gi, '$1work=MindaNews') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?pep\.ph\/?/gi, '$1work=Philippine Entertainment Portal') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?ptvnews\.ph\/?/gi, '$1work=PTV News') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?onenews\.ph\/?/gi, '$1work=One News') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?spin\.ph\/?/gi, '$1work=Sports Interactive Network Philippines')

.replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:Official Gazette of(?: the Republic of)? the Philippines|Official Gazette \(Philippines\))/gi, '$1work=Official Gazette of the Republic of the Philippines') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Philippine News Agency/gi, '$1work=Philippine News Agency') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Philippine Information Agency/gi, '$1work=Philippine Information Agency') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Interaksyon/gi, '$1work=Interaksyon') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Philippine Daily Inquirer/gi, '$1newspaper=Philippine Daily Inquirer') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:(?:The )?(?:\[\[)?Philippine Star(?:\]\])?|(?:\[\[])?PhilStar ?Life?(?:\]\])?)/gi, '$1work=The Philippine Star') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Manila Bulletin(?: News)?/gi, '$1work=Manila Bulletin') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:(?:The )?Manila ?Times|(?:\[\[)Manila ?Times(?:\]\]))/gi, '$1work=The Manila Times') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *ABS(?:-| )?CBN ?News/gi, '$1work=ABS-CBN News') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:(?:\[\[)GMA ?News(?:\]\])|GMA ?News(?: Online)?)/gi, '$1work=GMA News Online') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *CNN ?Philippines/gi, '$1work=CNN Philippines') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Rappler/gi, '$1work=Rappler') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Business ?World(?: Online)?/gi, '$1work=BusinessWorld') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Business ?Mirror/gi, '$1work=BusinessMirror') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:The )?(?:\[\[)?Manila ?Standard(?:\]\])?(?: News)?/gi, '$1work=Manila Standard') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:(?:\[\[)Sun ?Star(?:\]\])|Sun ?Star ?(?:Manila|Cebu|Iloilo|Baguio)?)/gi, '$1work=SunStar') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:The )?(?:\[\[)?Daily ?Tribune(?:\]\])?/gi, '$1work=Daily Tribune') //.replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:www\.)?malaya\.com\.ph\/?/gi, '$1work=Malaya') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *Minda ?News/gi, '$1work=MindaNews') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:Philippine Entertainment Portal|\[\[Pep\.ph\]\])/gi, '$1work=Philippine Entertainment Portal') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:PTV ?News|\[\[ptvnews\.ph\]\])/gi, '$1work=PTV News') .replace(/(\|) *(?:website|work|newspaper|publisher|agency) *= *(?:Sports Interactive Network Philippines|\[\[SPIN\.ph\]\])/gi, '$1work=Sports Interactive Network Philippines')

.options({ minor: true }) .appendEditSummary("Standardized some references.") .clickDiff; }		},	]); }); //