Extends
Methods
captcha(keyopt) → {Pots}
Install captcha key on each honeypot inside this collection
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
string |
<optional> |
if no key provided, this method use global key instead |
// this way
pots.captcha('someSiteKey');
// has the same effects to
pots.config({ key : 'someSiteKey' });
Returns:
current Pots
- Type
- Pots
config(options) → {Pots}
Config over all honeypot inside this collection
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
pots.config({ theme : 'light' });
Returns:
- Type
- Pots
each(fn) → {Pots}
Loop throughout collection and execute the same function on each honeypot
Parameters:
Name | Type | Description |
---|---|---|
fn |
function |
pots.each(function(pot){
// check if any pot is not ready
if(!pot.valid()){
alert('You are not human, are you?');
}
});
Returns:
current Pots
- Type
- Pots
fail(fn) → {Pots}
Add the same function to fail hooks of all honeypot instances inside this collections
Parameters:
Name | Type | Description |
---|---|---|
fn |
function |
Returns:
current Pots
- Type
- Pots
find(e) → {number}
Find index of element inside collection
- Inherited From:
flush()
Erase a collection
- Inherited From:
has(e) → {boolean}
Check if a collection contains an element
- Inherited From:
remove(e)
Remove an element
- Inherited From:
validate(fn) → {Pots}
Add the same function to validate hooks of all honeypot instances inside this collections
Parameters:
Name | Type | Description |
---|---|---|
fn |
function |
Returns:
current Pots
- Type
- Pots