User:Lenore/autolink.js: Difference between revisions

Content deleted Content added
m Adding User subpages
m fix in parsing URL
Line 96:
var autolinkColor = ''; // Link color in history pages
 
autolinkRegexURLinWcodeWoLabel = /()\[{1}((?:https?|ftps?):\/\/[^\{w-\}/\s.\:\?\=&;%~]+?)\s*\]{1}()/g;
// External links in history pages, wikicode without label
 
autolinkRegexURLinWcodeWithLabel = /()\[{1}((?:https?|ftps?):\/\/[^\{w-\}/\s.\:\?\=&;%~]+)()\s+([^\]\n]+)\]{1}()/g;
// External links in history pages, wikicode with label (the URL will not be visible)
 
Line 106:
var autolinkColor = 'inherit'; // Link color in other pages
 
autolinkRegexURLinWcodeWoLabel = /(\[{1})((?:https?|ftps?):\/\/[^\{w-\}/\s.\:\?\=&;%~]+?)(\s*\]{1})/g;
// External links in other pages, wikicode without label
 
autolinkRegexURLinWcodeWithLabel = /(\[{1})(((?:https?|ftps?):\/\/[^\{w-\}/\s.\:\?\=&;%~]+))(\s+[^\]\n]+)(\]{1})/g;
// External links in other pages, wikicode with label
 
}
 
autolinkRegexURL = /((?:[^>"\[]|[^\=]")(?:\<span class\="diffchange"\>|))((?:https?|ftps?):\/\/[^\{w-\}/\.\:\?\=&;%~]+?)((?:\<\/span\>|)[\s\]\)\|\}'"])/g;
// External links (no wikicode)
 
Line 126:
// Templates
 
autolinkRegexInternalURL = /([^\=])('|"|\s)((?:\/?w\/index\.php\?|\/?wiki\/)[^\sw-\{/\}.\|:\?\=&;%~]+?)\2/g;
// External links (no wikicode, under wgServer)
 
autolinkRegexImportScript = /([Ii]mport[Ss]cript(?:\<span class\="br0"\>)?\((?:\<\/span\>\<span class\="st0"\>)?)('|")([^\|\[\]\|<>\n]+?)(\2(?:\<\/span\>\<span class\="br0"\>)?\)(?:\<\/span\>)?)/g;
// ImportScript