1/* 2 * LeaveNotice - plug in to notify users of leaving your site 3 * Examples and documentation at: http://rewdy.com/tools/leavenotice-jquery-plugin 4 * Version: 1.1.3 (07/08/2013) 5 * Copyright (c) 2012 Andrew Meyer 6 * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License 7 * Requires: jQuery v1.4+ 8*/ 9 10(function(e){function t(t,n){if(t.timeOut>0){clearTimeout(n)}e("#"+t.overlayId+", #"+t.messageHolderId).fadeOut("fast",function(){e("#"+t.overlayId+", #"+t.messageHolderId).remove()});e(document).unbind("keyup")}e.fn.leaveNotice=function(n){var r={siteName:window.location.href,exitMessage:"<p><strong>You have requested a website outside of {SITENAME}.</strong></p><p>Thank you for visiting.</p>",preLinkMessage:"<div class='setoff'><p>You will now be directed to:<br/>{URL}</p></div>",linkString:"",newWindow:false,timeOut:4e3,overlayId:"ln-blackout",messageBoxId:"ln-messageBox",messageHolderId:"ln-messageHolder",linkId:"ln-link",displayUrlLength:50,overlayAlpha:.3};var i=e.extend(r,n);return this.each(function(){el=e(this);var n=el.attr("href");var r=i.displayUrlLength;if(n.length>=r){var s="..."}else{var s=""}var o=n.substr(0,r)+s;var u=el.attr("title");if(u===undefined||u==""){var a=o}else{var a=u}i.timeOut=i.newWindow?0:i.timeOut;el.click(function(){e("body").append('<div id="'+i.overlayId+'"></div>');e("body").append('<div id="'+i.messageHolderId+'"><div id="'+i.messageBoxId+'"></div></div>');if(i.overlayAlpha!==false){e("#"+i.overlayId).css("opacity",i.overlayAlpha)}preFilteredContent=i.exitMessage+i.preLinkMessage;msgContent=preFilteredContent.replace(/\{URL\}/g,'<a id="'+i.linkId+'" href="'+n+'" title="'+n+'"'+i.linkString+">"+a+"</a>");msgContent=msgContent.replace(/\{SITENAME\}/g,i.siteName);if(i.timeOut>0){msgContent+='<p id="ln-cancelMessage"><a href="#close" id="ln-cancelLink">Cancel</a> or press the ESC key.</p>'}else{msgContent+='<p id="ln-cancelMessage">Click the link above to continue or <a href="#close" id="ln-cancelLink">Cancel</a></p>'}e("#"+i.messageBoxId).append(msgContent);if(i.timeOut>0){leaveIn=setTimeout(function(){e("#ln-cancelMessage").html("<em>Loading...</em>");window.location.href=n},i.timeOut)}else{leaveIn=false}if(i.newWindow){e("a#"+i.linkId).attr("target","_blank").click(function(){t(i,leaveIn)})}e("#ln-cancelLink").click(function(){t(i,leaveIn);return false});e(document).bind("keyup",function(e){if(e.which==27){t(i,leaveIn)}});e(window).unload(function(){t(i,leaveIn)});return false})})}})(jQuery)
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.