JavaScript Restrictor
Browser extension that improves privacy and security
popup.js File Reference

JS code for pop up. More...

Functions

function showRefreshPageOption ()
 
function changeActiveLevel (activeEl)
 
browser tabs query (queryInfo).then(function(tabs)
 
document getElementById ('controls').addEventListener('click'
 
window close ()
 
window addEventListener ("load", function() { load_on_off_switch("nbs");load_on_off_switch("fpd");})
 
document getElementsByClassName ("slider")[0].addEventListener("click"
 
function async getCurrentSite ()
 
function async load_on_off_switch (prefix)
 Load switch state from storage for current site. More...
 
function async control_whitelist (prefix)
 Event handler for On/off switch. More...
 

Variables

const fadeOut = "0.3"
 
const fadeIn = "1.0"
 
var myAddon = new URL(browser.runtime.getURL ('./'))
 
var url
 
var queryInfo
 
function e
 

Detailed Description

JS code for pop up.

Author
Copyright (C) 2019 Martin Timko
Copyright (C) 2019 Libor Polcak
Copyright (C) 2020 Pavel Pohner
Copyright (C) 2021 Marek Salon
License:
SPDX-License-Identifier: GPL-3.0-or-later

Function Documentation

◆ addEventListener()

window addEventListener ( "load"  "load",
function() { load_on_off_switch("nbs");load_on_off_switch("fpd");}  function() { load_on_off_switch("nbs");load_on_off_switch("fpd");} 
)
Here is the caller graph for this function:

◆ changeActiveLevel()

function changeActiveLevel (   activeEl)

Visaully highlights the active level.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close()

window close ( )

◆ control_whitelist()

function async control_whitelist (   prefix)

Event handler for On/off switch.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrentSite()

function async getCurrentSite ( )
Here is the caller graph for this function:

◆ getElementById()

document getElementById (   'controls')

◆ getElementsByClassName()

document getElementsByClassName (   "slider")
Here is the call graph for this function:

◆ load_on_off_switch()

function async load_on_off_switch (   prefix)

Load switch state from storage for current site.

Here is the call graph for this function:

◆ query()

browser tabs query (   queryInfo)
Here is the call graph for this function:

◆ showRefreshPageOption()

function showRefreshPageOption ( )

Enable the refresh page option.

Here is the caller graph for this function:

Variable Documentation

◆ e

function e
Initial value:
{
browser.runtime.openOptionsPage()

◆ fadeIn

const fadeIn = "1.0"

◆ fadeOut

const fadeOut = "0.3"

◆ myAddon

var myAddon = new URL(browser.runtime.getURL ('./'))

◆ queryInfo

var queryInfo
Initial value:
= {
active: true,
currentWindow: true
}

◆ url

var url