Plugin to obfuscate email

Can you make the following plugin obfuscate-email available for all users?

Plugin:

const Fieldtype = {
  mixins: [window.Storyblok.plugin],
  template: `<div><input class="uk-width-1-1" v-model="obfuscated" /></div>`,
  computed: {
    obfuscated: {
      get() {
        return (this.model.value || '').split('').reverse().join('');
      },
      set(value) {
        this.model.value = value.split('').reverse().join('');
      }
    }
  },
  methods: {
    initWith() {
      return {
        plugin: 'obfuscate-email',
        value: ''
      }
    }
  },
  watch: {
    'model': {
      handler(value) {
        this.$emit('changed-model', value);
      },
      deep: true
    }
  }
}

Usage:

<span class="reversed">
  {{ email.value }}
</span>

Make it human-readable again with css.

.reversed {
  unicode-bidi: bidi-override;
  direction: rtl;
}
1 Like