Skip to content

Instantly share code, notes, and snippets.

@tripflex
Created December 17, 2019 19:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/d6b995a4141b3e56f6b530cf08ca4aac to your computer and use it in GitHub Desktop.
Save tripflex/d6b995a4141b3e56f6b530cf08ca4aac to your computer and use it in GitHub Desktop.
Hide/Obfuscate/Mask Email Address from Spam Bots (Vue.js Component)
<template>
<span class="reverse">{{reversedEmail}}</span>
</template>
<script>
export default {
name: 'hide-email',
props: [ 'email' ],
computed: {
reversedEmail(){
return this.email.split("").reverse().join("")
}
}
}
</script>
<style scoped>
span.reverse {
unicode-bidi: bidi-override;
direction: rtl;
}
</style>
@CavalcanteLeo
Copy link

but it doesn't work with cmd c (mac) or control C (windows)

Most of the user just copy e-mail like that, and never click it, to open the default e-mail app in computer.
Most of users prefer to use gmail or hotmail site instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment