mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
8 lines
388 B
CoffeeScript
8 lines
388 B
CoffeeScript
angular.module('Darkswarm').directive "obfuscatedEmail", ()->
|
|
restrict: 'C'
|
|
link: (scope, element, attrs)->
|
|
element.on 'cut copy', (event)->
|
|
event.preventDefault()
|
|
clipboardData = event.clipboardData || window.clipboardData || event.originalEvent.clipboardData
|
|
clipboardData.setData('text/plain', document.getSelection().toString().split('').reverse().join(''))
|