Moderator
Moderator component
Constructor Summary
Private Constructor | ||
private |
Initialize the instance. |
Member Summary
Public Members | ||
public |
Moderator is in disabled state |
|
public |
Logged in state |
Private Members | ||
private |
whitelist: * The Whitelist instance |
Method Summary
Public Methods | ||
public |
addToWhitelist(title: *, url: *): boolean Add to Whitelist |
|
public |
disable() Disable moderator |
|
public |
enable() Enable moderator |
|
public |
Get the serialized JSON form of the Whitelist. |
|
public |
Check if Chrome is locked. |
|
public |
Check if Chrome is unlocked. |
|
public |
Lock |
|
public |
Login |
|
public |
logout |
|
public |
removeFromWhitelist(url: *): boolean Remove from Whitelist |
|
public |
Unlock |
Private Methods | ||
private |
Get administator's email. |
|
private |
Get administator's password. |
|
private |
Get the current Whitelist instance. |
|
private |
Set administrator's email. |
|
private |
setPassword(password: string): void Set administrator's password. |
|
private |
Setup all event listeners. |
Private Constructors
Public Members
Private Members
Public Methods
public addToWhitelist(title: *, url: *): boolean source
Add to Whitelist
Params:
Name | Type | Attribute | Description |
title | * | ||
url | * |
public isLocked(): boolean source
Check if Chrome is locked. Locked means that an admin has signed in with their email.
public isUnlocked(): boolean source
Check if Chrome is unlocked. Locked means that an admin has signed in with their email.
public lock(email: *, password: *): boolean source
Lock
Params:
Name | Type | Attribute | Description |
* | |||
password | * |
public login(email: *, password: *): boolean source
Login
Params:
Name | Type | Attribute | Description |
* | |||
password | * |
public removeFromWhitelist(url: *): boolean source
Remove from Whitelist
Params:
Name | Type | Attribute | Description |
url | * |
public unlock(email: *, password: *): boolean source
Unlock
Params:
Name | Type | Attribute | Description |
* | |||
password | * |
Private Methods
private setEmail(email: string): void source
Set administrator's email.
Params:
Name | Type | Attribute | Description |
string | The new email. |
Return:
void | Void. |
private setPassword(password: string): void source
Set administrator's password.
Params:
Name | Type | Attribute | Description |
password | string | The new password. |
Return:
void | Void. |
private setupListeners() source
Setup all event listeners.
Listen:
onBeforeRequest |
Listens for before requests |