Sha256: 04dc42bc1c3349f8b1a11388e956953de20fdfbc44914ec2922474518122695d

Contents?: true

Size: 701 Bytes

Versions: 7

Compression:

Stored size: 701 Bytes

Contents

jQuery(function(){
    jQuery('[data-email]').each(function(){
        var obfuscated_address = jQuery(this).attr('data-email');
        if(typeof obfuscated_address == 'string' && obfuscated_address != '') {
            var clean_email = obfuscated_address.replace(
                /[a-zA-Z]/g,
                function(c){
                    return String.fromCharCode((c<='Z'?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);
                }
            );
            jQuery(this).html(clean_email);
            if(jQuery(this).attr('href') != '') {
                jQuery(this).attr('href', 'mailto:'+clean_email);
            }
            jQuery(this).removeAttr('data-email');
        }
    });
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
phantom-blergh-0.2.0 assets/js/email.js
phantom-blergh-0.1.5 assets/js/email.js
phantom-blergh-0.1.4 assets/js/email.js
phantom-blergh-0.1.3 assets/js/email.js
phantom-blergh-0.1.2 assets/js/email.js
phantom-blergh-0.1.1 assets/js/email.js
phantom-blergh-0.1.0 assets/js/email.js