anti_spam 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a7b605acb7bde00ad8bcdd41b0cc289e8c34c7f
4
- data.tar.gz: 4024a3f209fb37675412182664b653d0f1aa5028
3
+ metadata.gz: 4e861790e86f74a3e498d78c9ea86b5c6ce34b74
4
+ data.tar.gz: ad931dc8d23c897cf66a70743229ee73ee57ff94
5
5
  SHA512:
6
- metadata.gz: f7f9da89f1ea4dc71418fbc9685ae43c792f696e409467576b62659af7074ea4e8d3e60a50cd03d7ff7ecb620e3ff9cb4664397b9300e0aefe2de7b9477d93a4
7
- data.tar.gz: b0bbdbb57ab30a853526bbbcbbe8a041b0b29f27bcb498c6825d97e0c087a7ec9afdec2ad60d488c96b78a6236057020ead5abe28a34773397ebe7a1d368f817
6
+ metadata.gz: a1258e553dfbe869d225927aeed57baee52494011a05b781560c8964ec1db194a8ced3230900bf0d44403ce0bc1ce6e441903d2fa6f53a544d0ffea43edf9ab2
7
+ data.tar.gz: 3e66d7665b56742399b2678fcd210e14110e05b86023e39239f2af0fa899534f4cbac42cf27e5509f68a223fcf65c6eb324e164e26e90f610d8813867eeab4b5
@@ -3,19 +3,20 @@
3
3
  var antiSpamizeForms = function(){
4
4
  var forms = document.querySelectorAll("form");
5
5
  for(var i = 0, max = forms.length; i < max; i++){
6
- var form = forms[i];
7
- form.onsubmit = function(){
8
- if(form.querySelectorAll('input.antispam_token').length == 0){
9
- var input = document.createElement('input');
10
- input.type = 'hidden';
11
- input.name = 'antispam_token';
12
- input.className = 'antispam_token'
13
- input.value = '<%= AntiSpam.token %>';
14
- form.appendChild(input);
15
- form.submit();
16
- return false;
6
+ (function(form){
7
+ form.onsubmit = function(){
8
+ if(form.querySelectorAll('input.antispam_token').length == 0){
9
+ var input = document.createElement('input');
10
+ input.type = 'hidden';
11
+ input.name = 'antispam_token';
12
+ input.className = 'antispam_token'
13
+ input.value = '<%= AntiSpam.token %>';
14
+ form.appendChild(input);
15
+ form.submit();
16
+ return false;
17
+ }
17
18
  }
18
- }
19
+ })(forms[i]);
19
20
  }
20
21
  }
21
22
 
@@ -1,3 +1,3 @@
1
1
  module AntiSpam
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anti_spam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rogério Chaves