Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: pages/address-masking.md

Issue 29773577: Fixes #68 - Implemented address masking script (Closed) Base URL: https://hg.adblockplus.org/website-defaults
Patch Set: Created May 7, 2018, 5:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pages/index.html » ('j') | static/js/address-masking.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pages/address-masking.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/pages/address-masking.md
@@ -0,0 +1,32 @@
+title=Address Masking
+description=Use address masking to avoid spam.
+
+# Address masking
+
+Use address masking to avoid spam.
+
+## Usage
+
+```
+// 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.
+
+btoa("mailto:username@example.com")
+
+// 2. Place encoded address inside `data-address`
+
+<a data-address="bWFpbHRvOnVzZXJuYW1lQGV4YW1wbGUuY29t">Private Email</a>
+
+// 3. Include `static/js/address-masking.js`
+
+<script src="static/js/address-masking.js"></script>
+
+// 4. See `data-address` decoded into `href` appropriately
+
+<a href="mailto:username@example.com">Private Email</a>
+```
+
+## Example
+
+<script src="/js/address-masking.js"></script>
+
+<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
« no previous file with comments | « no previous file | pages/index.html » ('j') | static/js/address-masking.js » ('J')

Powered by Google App Engine
This is Rietveld