-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·94 lines (92 loc) · 3.37 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Live sample for jsNoSpam</title>
<script type="text/javascript" src="jsNoSpam.js">
</script>
<style>
a {
text-decoration: none;
}
.highlight, .highlight:hover, .highlight:focus {
text-decoration: none;
outline: none;
outline: 0;
background: yellow;
}
.highlight {
line-height: 1.1;
display: inline-block;
}
.highlight:after {
display: block;
content: "";
height: 1px;
width: 0%;
background-color: #0082a7; /*#CE3B2F*/
-webkit-transition: width 0.5s ease;
-moz-transition: width 0.5s ease;
-ms-transition: width 0.5s ease;
transition: width 0.5s ease;
}
.highlight:hover:after, .highlight:focus:after {
width: 100%;
}
</style>
</head>
<body>
<h1>Live sample for jsNoSpam</h1>
<p>a simple demonstration for the options described in <a href="https://github.com/Offbeatmammal/jsNoSpam">jsNoSpam</a> from <a href="http://post.offbeatmammal.com/2016/03/06/jsnospam-make-it-harder-for-bots-to-find-your-email-address/">Offbeatmammal</a>.</p>
<p>View the source for each example to see more explaination.</p>
<table>
<tr>
<td>Hidden, default text:</td>
<td><script type="text/javascript">
jsNSemail("rknzcyr*rknzcyr.pbz");
</script></td>
</tr>
<tr>
<td>Hidden, override text (source also shows example of splitting email):</td>
<td><script type="text/javascript"> // also demonstrate splitting up source email
// over-ride text (3rd parameter) can be text, or more complex HTML
jsNSemail("rknzcyr"+"*"+"rknzcyr.pbz",true,"show me the email address");
</script></td>
</tr>
<tr>
<td>Hidden, override text, wth HTML formatting:</td>
<td><script type="text/javascript"> // also demonstrate splitting up source email
// over-ride text (3rd parameter) can be text, or more complex HTML
jsNSemail("rknzcyr"+"*"+"rknzcyr.pbz",true,"show <b><i>me</i></b> the <b>email address</b>");
</script></td>
</tr>
<tr>
<td>Not hidden (but source shows a more complex way of breaking up, and reversing, parts of the email):</td>
<td><script type="text/javascript"> // demonstrate more complex pre-processing on email
jsNSemail(("zbp.rycznk"+"r*r"+"ycznkr").split('').reverse().join(''));
</script></td>
</tr>
<tr>
<td>Hidden, override text, wth style class:</td>
<td><script type="text/javascript"> // also demonstrate splitting up source email
// over-ride text (3rd parameter) can be text, or more complex HTML
jsNSemail("rknzcyr"+"*"+"rknzcyr.pbz",true,"show <b><i>me</i></b> the <b>email address</b>","highlight");
</script></td>
</tr>
<tr>
<td>Hidden, no override text text, wth style class:</td>
<td><script type="text/javascript"> // also demonstrate splitting up source email
// over-ride text (3rd parameter) can be text, or more complex HTML
jsNSemail("rknzcyr"+"*"+"rknzcyr.pbz",true,"","highlight");
</script></td>
</tr>
<tr>
<td>Not hidden, so no override text text, but wth style class:</td>
<td><script type="text/javascript"> // also demonstrate splitting up source email
// over-ride text (3rd parameter) can be text, or more complex HTML
jsNSemail("rknzcyr"+"*"+"rknzcyr.pbz",false,"highlight");
</script></td>
</tr>
</table>
<p>If this helps you and you want to give back... <a href="http://amzn.to/1SHjbLI">I wrote a book</a> :)</p>
</body>
</html>