Content deleted Content added
Ohconfucius (talk | contribs) align to test script |
Ohconfucius (talk | contribs) simplify; repeat ''work' and its alias (pre)' |
||
Line 22:
var txt=document.editform.wpTextbox1;
txt.value=txt.value.replace(/([^>\*][ ]?)\[https?:\/\/[^\s\[\]]*[ ]([\'\w\d][^\[\]]*)\](?![ ]*[\n\-]+)/gi, '$1$2');
Line 35 ⟶ 34:
// removing references to other WP articles and 'external' WP links
regex(/<ref>\[https?:\/\/(?:en\.wikipedia\.org\/wiki|www\.(?:facebook|myspace|twitter)\.com)\/[^\s\]]*[ ]+[\w\d][^\]]*\]<\/ref>/gi, '');
regex(/\|[ ]*url[ ]*=[ ]*https?:\/\/(?:\w{2}\.wikipedia\.org\/wiki|www\.(?:facebook|myspace|twitter)\.com)[^\s\|\{\}<]*(?=[ ]*[\|\}])/gi, '');
Line 145 ⟶ 144:
regex(/(?:agency|journal|newspaper|periodical|publisher|work)(\s?=\s?\[\[)(?:MTV (?:[A-Z]\w*|\([^\)\]]*\)))\|[^\)\]]*(\]\])/gi, 'publisher$1MTV$2');
//'work' and its alias (pre)
regex(/(\|[ ]*?newspaper[ ]*=[^\|]*(?:\|[^\{\}]*|))(?:\|[ ]*?work[ ]*=[^\|\}]*)(?=[\|\}])+/gi, '$1');
//unwinding of unnecessary pipes
regex(/(\[\[)Public Broadcasting Service\|(PBS\]\])/gi, '$1$2');
|