User:Frietjes/addcheckforunknownparameters.js: Difference between revisions

Content deleted Content added
No edit summary
per request
Line 15:
var mytxt = mycontent.value;
var mytxt2 = mycontent.value;
// Make sure we haven't already done this before
if(mytxt.search(/\{\{#invoke:[Cc]heck[_ ]+for[_ ]+unknown[_ ]+parameters/g) >= 0 ) {
alert('Already added, aborting ...');
return;
}
// Remove {PAGENAME}, {BASEPAGENAME}, ...
mytxt = mytxt.replace(/\{\{(?:PAGENAME|BASEPAGENAME|FULLPAGENAME|CURRENTYEAR)\}\}/g, '');