1jQuery(function ($){ 2'use strict'; 3function rot13(s){ 4return s.replace(/[a-zA-Z]/g, function (c){ 5return String.fromCharCode((c <='Z' ? 90:122) >=(c=c.charCodeAt(0) + 13) ? c:c - 26); 6}); 7} 8function fetchEmail(el){ 9var email=el.getAttribute('data-enc-email'); 10if(!email){ 11return null; 12} 13email=email.replace(/\[at\]/g, '@'); 14email=rot13(email); 15return email; 16} 17function parseTitle(el){ 18var title=el.getAttribute('title'); 19var email=fetchEmail(el); 20if(title&&email){ 21title=title.replace('{{email}}', email); 22el.setAttribute('title', title); 23}} 24function setInputValue(el){ 25var email=fetchEmail(el); 26if(email){ 27el.setAttribute('value', email); 28}} 29function mailto(el){ 30var email=fetchEmail(el); 31if(email){ 32window.location.href='mailto:' + email; 33}} 34function revert(el, rtl){ 35var email=fetchEmail(el); 36if(email){ 37rtl.text(email); 38rtl.removeClass('eeb-rtl'); 39}} 40document.addEventListener('copy', function(e){ 41$('a[data-enc-email]').each(function (){ 42var rtl=$(this).find('.eeb-rtl'); 43if(rtl.text()){ 44revert(this, rtl); 45}}); 46console.log('copy'); 47}); 48$('body').on('click', 'a[data-enc-email]', function (){ 49mailto(this); 50}); 51$('a[data-enc-email]').each(function (){ 52parseTitle(this); 53}); 54$('input[data-enc-email]').each(function (){ 55setInputValue(this); 56}); 57});
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.