obscura_linka 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/app/assets/javascripts/obscura_linka/application.js +7 -7
- data/lib/obscura_linka/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa5190a76427caa3528b34a6639fd693ef11294c
|
4
|
+
data.tar.gz: 589174a6969d34fd3ad1bb75f579bc018cc2d793
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b12e124c419046397bf169474222d7f089429130b406180e070220655b333138f1c105e578a99f7bb36370c2e174a18f5c2a3144d6e90d8e2ab5a74d45863d7
|
7
|
+
data.tar.gz: 860a3fe132d64c4fc33c370e91248bd73156d785d93645e726f9af809e01059bd671d532057809a2451f40c3b250362729208fb28ee07855394069d58d83c1af
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@ This is a Rails Engine. That adds a couple of things.
|
|
2
2
|
|
3
3
|
## Installation
|
4
4
|
|
5
|
+
This has only been tested on Rails 4.1.1
|
6
|
+
|
5
7
|
Add this line to your application's Gemfile:
|
6
8
|
|
7
9
|
gem 'obscura_linka'
|
@@ -11,6 +13,7 @@ Add this line to your application's Gemfile:
|
|
11
13
|
```ruby
|
12
14
|
# In the views
|
13
15
|
# this link href will be obscured
|
16
|
+
# It will look like: <a href='' data-href="xxux://xuxuxm.nv8vjv" class='rot_13'>my link</a>
|
14
17
|
<%= obscura_link_to('my link', root_path) %>
|
15
18
|
```
|
16
19
|
|
@@ -15,14 +15,14 @@
|
|
15
15
|
|
16
16
|
window.onload=function() {
|
17
17
|
|
18
|
-
|
19
|
-
rot_elements = document.getElementsByClassName('rot13_link')
|
18
|
+
var rot_elements = document.getElementsByClassName("rot13_link");
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
20
|
+
for (var i = 0; i < rot_elements.length ; i++) {
|
21
|
+
rot_elements[i].addEventListener("click",
|
22
|
+
function (event) {
|
23
|
+
event.preventDefault();
|
24
|
+
window.location = rot13(this.getAttribute("data-href"));
|
25
|
+
}, false);
|
26
26
|
}
|
27
27
|
|
28
28
|
function rot( t, u, v ) {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: obscura_linka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Fonacier
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-06-
|
13
|
+
date: 2014-06-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -44,9 +44,9 @@ description: Obscure links by creating and using link_to to move the rot13 the h
|
|
44
44
|
to a data-attr. And in an including JS take that data attribute un-rot 13 it and
|
45
45
|
tell the browser to go to that link
|
46
46
|
email:
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
47
|
+
- austinrf@gmail.com
|
48
|
+
- kyle@kyleboss.com
|
49
|
+
- kpatel2014@gmail.com
|
50
50
|
executables: []
|
51
51
|
extensions: []
|
52
52
|
extra_rdoc_files: []
|
@@ -92,7 +92,7 @@ files:
|
|
92
92
|
- test/integration/navigation_test.rb
|
93
93
|
- test/obscura_linka_test.rb
|
94
94
|
- test/test_helper.rb
|
95
|
-
homepage: http://github.com/
|
95
|
+
homepage: http://github.com/austinrfnd/obscura_linka
|
96
96
|
licenses: []
|
97
97
|
metadata: {}
|
98
98
|
post_install_message:
|