Content deleted Content added
disabilito nelle pagine normali (si blocca in quelle troppo grosse) |
linkify in javascript codes |
||
Line 57:
autolinkTargetDiv[0] = document.getElementsByClassName('comment');
autolinkColor = ''; // coloured links
} else
autolinkTargetDiv[0] = document.getElementsByTagName('source');
autolinkTargetDiv[1] = document.getElementsByClassName('javascript');
autolinkTargetDiv[2] = document.getElementsByClassName('source-javascript');
autolinkColor = ''; // coloured links
}
/* ------------------------------------------ Regex --------------------------------------------- */
Line 82 ⟶ 87:
var autolinkActivateHTML = false;
/*
autolinkRegexTl = /([^{]{{2}\s*[Tt]l\|)([^[\]{}|:<>\n]+)/g;
Line 127 ⟶ 132:
// External links in comments or code sections, wikicode with label (the URL will not be visible)
autolinkRegexOtherPages = /((?:[^{]|^)\{{2}\s*(?:(?:[Ss][Uu][Bb][Ss][Tt]|[Mm][Ss][Gg]|[Mm][Ss][Gg][Nn][Ww])\s*:)?\s*)((?:[Dd]iscussion[ei] ?)?\s*(?:[Ss]peciale?|[Ww](?:ikipedia|P)|[Tt]emplate|[Uu](?:ser|tente)|[Pp]ortale?|[Pp]rogetto)?\s*(?: ?[Tt]alk)?\s*:[^[\]{}|:<>\n]+)(\||}{2})/gm;
autolinkRegexSubstOtherPages = '$1<a class="autolink" style="color:' + autolinkColor + '" href="/wiki/$2">$2</a>$3';
// Other pages included in comments or code sections
Line 154 ⟶ 159:
// ImportScript
/*
for (i=0; i<autolinkTargetDiv.length; i++) {
|