obscura_linka 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cea738edb16422a0993b6e6f812a5fd07b1b7651
4
- data.tar.gz: d1983368b391b240b533c407eb3fbc6b08855c13
3
+ metadata.gz: fa5190a76427caa3528b34a6639fd693ef11294c
4
+ data.tar.gz: 589174a6969d34fd3ad1bb75f579bc018cc2d793
5
5
  SHA512:
6
- metadata.gz: b41b996dfa09615d7c384be1e5decd4ec766f706251df39a15d6d9c6bf0b353169b81b171c0fd3e6ea7ccdb9a19dee21b0c67e9f2b778ba814fbfcd3090f9405
7
- data.tar.gz: 9e69c30f2d0edb7ba9dcc475b51adca5b03922518936cc770ee221c88930416f40348d003331a160f93843fa2a75b2f7a5ab36caf1ebdd250750b99eb5b0ac88
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
- // Get all elements that need to be obfuscated
19
- rot_elements = document.getElementsByClassName('rot13_link')
18
+ var rot_elements = document.getElementsByClassName("rot13_link");
20
19
 
21
- // Add onclick listeners to each link with deciphered code
22
- for(var x = 0; x < rot_elements.length; x++) {
23
- rot_elements[x].addEventListener("click",function(){
24
- window.location = rot13(this.getAttribute("data-href"));
25
- },false);
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 ) {
@@ -1,3 +1,3 @@
1
1
  module ObscuraLinka
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.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-10 00:00:00.000000000 Z
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
- - austin@spokeo.com
48
- - kboss@spokeo.com
49
- - kpatel@spokeo.com
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/Spokeo/obscura_linka
95
+ homepage: http://github.com/austinrfnd/obscura_linka
96
96
  licenses: []
97
97
  metadata: {}
98
98
  post_install_message: