JavaScript Restrictor
Browser extension that improves privacy and security
Loading...
Searching...
No Matches
options.js File Reference

Code that handles the configuration of the extension. More...

Functions

function prepare_level_config (action_descr, params)
 
function edit_level (id)
 
function restore_level (id, level_params)
 
function show_existing_level (levelsEl, level)
 
function remove_level (id)
 
function update_level_details (heading, level)
 
function update_level_details_default ()
 
function insert_levels ()
 
document getElementById ("new_level").addEventListener("click" => show_whitelist("nbs"))
 
document getElementsByClassName ("slider")[0].addEventListener("click"
 
function async load_module_settings (prefix)
 
function show_whitelist (prefix)
 
function hide_whitelist (prefix)
 
function add_to_whitelist (prefix)
 
function remove_from_whitelist (prefix)
 
function update_whitelist (listbox, prefix)
 
function setStorageAndSendMessage (setter, message)
 
function getSelectValues (select)
 
function loadWhitelist (prefix)
 
function load_on_off_switch (prefix)
 
function control_slider (prefix)
 
function toggleSettings (prefix, enable)
 
function prepareHiddenHelpText (originally_hidden_elements, originally_visible_elements=[])
 

Variables

const MANDATORY_METADATA = ["level_id", "level_text", "level_description"]
 
function let seq = Object.keys(levels).length
 
let new_id
 
 do
 
document document document document e => {if (e.key === 'Enter') add_to_whitelist("nbs")})
 

Detailed Description

Code that handles the configuration of the extension.

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

Function Documentation

◆ add_to_whitelist()

function add_to_whitelist (   prefix)
Here is the call graph for this function:

◆ control_slider()

function control_slider (   prefix)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ edit_level()

function edit_level (   id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getElementById()

document getElementById (   "new_level") => show_whitelist("nbs"))

◆ getElementsByClassName()

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

◆ getSelectValues()

function getSelectValues (   select)
Here is the caller graph for this function:

◆ hide_whitelist()

function hide_whitelist (   prefix)

◆ insert_levels()

function insert_levels ( )
Here is the call graph for this function:

◆ load_module_settings()

function async load_module_settings (   prefix)

◆ load_on_off_switch()

function load_on_off_switch (   prefix)
Here is the call graph for this function:

◆ loadWhitelist()

function loadWhitelist (   prefix)
Here is the caller graph for this function:

◆ prepare_level_config()

function prepare_level_config (   action_descr,
  params 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareHiddenHelpText()

function prepareHiddenHelpText (   originally_hidden_elements,
  originally_visible_elements = [] 
)
Here is the caller graph for this function:

◆ remove_from_whitelist()

function remove_from_whitelist (   prefix)
Here is the call graph for this function:

◆ remove_level()

function remove_level (   id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore_level()

function restore_level (   id,
  level_params 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStorageAndSendMessage()

function setStorageAndSendMessage (   setter,
  message 
)
Here is the caller graph for this function:

◆ show_existing_level()

function show_existing_level (   levelsEl,
  level 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ show_whitelist()

function show_whitelist (   prefix)
Here is the call graph for this function:

◆ toggleSettings()

function toggleSettings (   prefix,
  enable 
)
Here is the caller graph for this function:

◆ update_level_details()

function update_level_details (   heading,
  level 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_level_details_default()

function update_level_details_default ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_whitelist()

function update_whitelist (   listbox,
  prefix 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ do

do
Initial value:
{
new_id = "Custom" + String(seq)
function let seq
Definition options.js:259
let new_id
Definition options.js:260

◆ e

function e => {if (e.key === 'Enter') add_to_whitelist("nbs")})

◆ MANDATORY_METADATA

const MANDATORY_METADATA = ["level_id", "level_text", "level_description"]

◆ new_id

let new_id

◆ seq

seq = Object.keys(levels).length