1// *** START EXTERNAL LINK WARNINGS 2 3(function (ExternalLinksModule, $, undefined) { 4 ExternalLinksModule.trackExternalLinkToGoogle = function (link) { 5 try { 6 _gat._getTrackerByName()._trackEvent("outgoing", link); 7 } 8 catch (eer) { 9 } 10 } 11 12 ExternalLinksModule.displayExternalLinkMessage = function (href, target) { 13 var atarget; 14 var link = $("<a>"); 15 var template = jQuery.data(document.body, "ExternalLinkTemplate"); 16 17 link.attr("href", href); 18 if (target) link.attr("target", target); 19 link.html(href); 20 21 overlayDisplay(template); 22 23 var btnExternalLinkOk = $('#btnExternalLinkOk'); 24 25 $('#external_link').empty().append(link); 26 $('#external_link').unbind("click").bind("click", function () { 27 setTimeout(function () { 28 if (target == "_blank") { open(href); } 29 else { document.location = href; }; 30 }, 200); 31 trackExternalLinkToGoogle(href); 32 return false; 33 }); 34 35 btnExternalLinkOk.click(function () { 36 setTimeout(function () { 37 if (target == "_blank") { open(href); } 38 else { document.location = href; }; 39 }, 200); 40 41 trackExternalLinkToGoogle(href); 42 }); 43 } 44 45 ExternalLinksModule.getHost = function (url) { 46 url = url.replace("http://", ""); 47 url = url.replace("https://", ""); 48 var i = url.indexOf("/"); 49 if (i > 0) { 50 url = url.substring(0, i); 51 } 52 return url; 53 } 54 55}(window.ExternalLinksModule = window.ExternalLinksModule || {}, jQuery)); 56 57jQuery(function () { 58 if (jQuery.data(document.body, "EnableExternalLinkWarning")) { 59 $("a").each(function () { 60 var link = $(this); 61 var href = this.href; 62 var host = window.location.host.replace(/^(([^\/]+?\.)*)([^\.]{4,})((\.[a-z]{1,4})*)$/, '$3$4'); 63 var opts = {}; 64 65 var externalLinkSafeList = jQuery.data(document.body, "ExternalLinkSafeListArray"); 66 67 if (href != null && (externalLinkSafeList == null || jQuery.inArray(this.hostname, externalLinkSafeList) < 0) && !link.is(".exempt")) { 68 if ((this.href.match(/^http/)) && (!this.href.match(host)) && (!this.href.match(/^javascript/))) { 69 link.click(function () { 70 ExternalLinksModule.displayExternalLinkMessage(href, link.attr("target")); 71 return false; 72 }); 73 } 74 } 75 }); 76 } 77}); 78 79// *** END EXTERNAL LINK WARNINGS
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.