Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 title=Address Masking | |
2 description=Use address masking to avoid spam. | |
3 | |
4 # Address masking | |
5 | |
6 Use address masking to avoid spam. | |
7 | |
8 ## Usage | |
9 | |
10 ``` | |
11 // 1. Base64 encoded sensitive address | |
ire
2018/05/07 23:02:23
NIT: Why not separate the code blocks so the title
juliandoucette
2018/05/07 23:51:39
Done.
| |
12 | |
13 btoa("mailto:username@example.com") | |
14 | |
15 // 2. Place encoded address inside `data-address` | |
16 | |
17 <a data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t">Private Email</a> | |
18 | |
19 // 3. Include `static/js/address-masking.js` | |
20 | |
21 <script src="static/js/address-masking.js"></script> | |
22 | |
23 // 4. See `data-address` decoded into `href` appropriately | |
24 | |
25 <a href="mailto:username@example.com">Private Email</a> | |
26 ``` | |
27 | |
28 ## Example | |
29 | |
30 <script src="/js/address-masking.js"></script> | |
31 | |
32 <a data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t">Private Email</a> | |
ire
2018/05/07 23:02:23
What about when there is no JS? This makes the lin
juliandoucette
2018/05/07 23:51:39
Yep :( ... I don't see a Frontend way around that.
ire
2018/05/09 05:19:54
Yeah, I'm not sure of a solution to this either. C
juliandoucette
2018/05/15 09:53:36
<julian> judith: Is it a problem if our phone numb
ire
2018/05/15 15:12:07
A reason for no-js you didn't mention was performa
| |
OLD | NEW |