Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
MacTheZazou committed Mar 11, 2017
1 parent 25d0f6c commit cd4f7b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# <invisible-recaptcha>

A Polymer Invisible Recaptcha web-component for 🤖 detection (Polymer 1.x)
A Polymer [Invisible Recaptcha](https://www.google.com/recaptcha) web-component for 🤖 detection (Polymer 1.x)

`<invisible-recaptcha>` is an web-component implementation of the Invisible Recaptcha by Google.

### How to detect 🤖 :

1. You need to get an API Key here: http://www.google.com/recaptcha/admin (select invisible Recaptcha)
1. You need to get an API Key [here](http://www.google.com/recaptcha/admin) (select invisible Recaptcha)
2. Place the element where you want
3. When you want to make the verification, just call the verify function.
4. Wait the end of the verification. `verification-finished` will fire.
5. Verify the token with your backend. see https://developers.google.com/recaptcha/docs/verify for more informations.
5. Verify the token with your backend. [Full documentation](https://developers.google.com/recaptcha/docs/verify)

### How to use inside shadow-dom :

Expand Down
8 changes: 3 additions & 5 deletions invisible-recaptcha.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<link rel="import" href="../polymer/polymer.html">

<!--
A Polymer Invisible Recaptcha web-component for 🤖 detection (Polymer 1.x)
A Polymer [Invisible Recaptcha](https://www.google.com/recaptcha) web-component for 🤖 detection (Polymer 1.x)
`<invisible-recaptcha>` is an web-component implementation of the Invisible Recaptcha by Google.
<invisible-recaptcha recaptcha-key=""></invisible-recaptcha>
### How to detect 🤖 :
1. You need to get an API Key here: http://www.google.com/recaptcha/admin (select invisible Recaptcha)
1. You need to get an API Key [here](http://www.google.com/recaptcha/admin) (select invisible Recaptcha)
2. Place the element where you want
3. When you want to make the verification, just call the verify function.
4. Wait the end of the verification. `verification-finished` will fire.
5. Verify the token with your backend. see https://developers.google.com/recaptcha/docs/verify for more informations.
5. Verify the token with your backend. [Full documentation](https://developers.google.com/recaptcha/docs/verify)
### How to use inside shadow-dom :
Expand Down Expand Up @@ -51,7 +51,6 @@
document.querySelector('invisible-recaptcha')._handleResponse(token);
}else {this.dispatchEvent(new Event('verificationFinished'));}
this.dispatchEvent(new Event('verificationFinished'));
console.log(12);
}
Polymer({
is: 'invisible-recaptcha',
Expand Down Expand Up @@ -147,7 +146,6 @@
grecaptcha.render(this.shadowHelper, renderOption);
},
_handleResponse: function() {
console.log(13);
var token = grecaptcha.getResponse();
this.lastResponse = token;
this.fire('verification-finished', {'token': token});
Expand Down

0 comments on commit cd4f7b3

Please sign in to comment.