1/* 2 Based on this article: 3 http://www.html-advisor.com/javascript/hide-email-with-javascript-jquery/ 4 5 Example markup: 6 --------------- 7 8 <span class="mailme" title="Send me a letter!">me at mydomain dot com</span> 9 10 Example code: 11 ------------- 12 13 // Replaces all the matching elements with a <a href="mailto:..> tag. 14 15 $('span.mailme').mailme(); 16 17*/ 18 19jQuery.fn.mailme = function() { 20 var at = / at /; 21 var dot = / dot /g; 22 this.each( function() { 23 var addr = jQuery(this).text().replace(at,"@").replace(dot,"."); 24 var title = jQuery(this).attr('title') 25 var className = jQuery(this).attr('class').replace(/mailme/,''); 26 $(this) 27 .after('<a href="mailto:'+addr+'" class="'+className+'">'+ (title ? title : addr) +'</a>') 28 .remove(); 29 }); 30};
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.