Home Reference Source Repository
public class | source

Popup

Popup view for Burnt Chrome

Constructor Summary

Private Constructor
private

Initialize the instance.

Member Summary

Public Members
public

Background page.

public

Static form data

public

Last error message

public

Template element ID

Method Summary

Public Methods
public

Add to Whitelist

public

downloadData(name: string, data: string, type: string)

Download the given data to the users computer as a file

public

Import entries from an existing whitelist

public

Show IntroJS tutorial for whitelist list page

public

lock()

Lock

public

Show IntroJS tutorial for login page

public

logout()

Logout

public

Remove entry from whitelist

public

showError(error: Error)

Show error in User Interface

public

unlock()

Unlock

Private Methods
private

bind()

Bind the events

private

getContext(): *

Generate the context to pass to the template to render.

private

Refresh the template

private

render(id: *, context: *)

Render the template with a context

private

Setup handlebars views to render compiled templates to.

Private Constructors

private constructor source

Initialize the instance.

Public Members

public background: * source

Background page.

public formData: * source

Static form data

public lastErrorMessage: string source

Last error message

public templateId: string source

Template element ID

Public Methods

public addToWhitelist() source

Add to Whitelist

public downloadData(name: string, data: string, type: string) source

Download the given data to the users computer as a file

Params:

NameTypeAttributeDescription
name string

Name of the file

data string

Contents of the file

type string

MIME type of the file

public importWhitelist(whitelist: whitelist) source

Import entries from an existing whitelist

Params:

NameTypeAttributeDescription
whitelist whitelist

An existing whitelist to copy entries from

public listIntro() source

Show IntroJS tutorial for whitelist list page

public lock() source

Lock

public loginIntro() source

Show IntroJS tutorial for login page

public logout() source

Logout

public removeFromWhitelist(url: string) source

Remove entry from whitelist

Params:

NameTypeAttributeDescription
url string

URL pattern in an existing whitelist entry

public showError(error: Error) source

Show error in User Interface

Params:

NameTypeAttributeDescription
error Error

The error to show

public unlock() source

Unlock

Private Methods

private bind() source

Bind the events

private getContext(): * source

Generate the context to pass to the template to render.

Return:

*

private refresh() source

Refresh the template

private render(id: *, context: *) source

Render the template with a context

Params:

NameTypeAttributeDescription
id *
context *

private setupTemplates() source

Setup handlebars views to render compiled templates to.