User:Ohconfucius/test/Sources.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 53:
//
// regex(/(\|\s*(?:author|publisher|work) *= *)(?:https?:\/{2}|)(?:w{3}\.|)(\w+(?:\.(?:com?|net|org|gov|\w{2})|)(?:\.\w{2}|))(?:\/[^|}]*|)(?=\s*[\]|}])/gi, '$1$2'); //returns ___domain name
// regex(/(\|\s*title\s*\=\s*)https?:\/{2}(?:w{3}\.|)(\w+\.com)(?=\s?(?:[=|{]|\}\}))/gi, '$1<!-- ACTUAL ARTICLE TITLE BELONGS HERE! original text: $2 -->');
// regex(/(\|\s*title\s*\=\s*)https?:\/{2}([^|\s]+)(?=\s?(?:[=|{]|\}\}))/gi, '$1<!-- ACTUAL ARTICLE TITLE BELONGS HERE! original text: $2 -->');
// regex(/(\|\s*title\s*\=\s*)(Archived copy)(?=\s?(?:[=|{]|\}\}))/gi, '$1<!-- ACTUAL ARTICLE TITLE BELONGS HERE! original text: $2 -->');
Line 111:
regex(/(\.\.\. |)\{\{!\}\} 立場(報道|新聞)/gi, '');
regex(/(\|\s*title\s*\=\s*)Login ?(?=[|}])/gi, '$1'); //creating deliberate error (blank title) per Trappist
regex(/(\|\s*title\s*\=\s*)<!--ACTUAL ARTICLE TITLE BELONGS HERE! original text:[\w\s]+ -->/gi, '$1'); //rem error introduced bt earlier version of this script; entirely strip title field
regex(/(\|\s*)(?:publisher|website|work)=You ?tube(?:\.com|)(?=\s*[|}])/gi, '$1via=YouTube');
regex(/(\|\s*)(?:publisher|website|work)=(Amazon)(?:\.com|)(?:\.\w{2}|)(?=\s*[|}])/gi, '$1via=$2');