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

Operations and data structures connected to protection levels. More...

Functions

function is_api_undefined (api)
 
function are_all_api_unsupported (wrappers)
 
function init_levels ()
 
function updateLevels (res)
 
function changedLevels (changed, area)
 
function setDefaultLevel (level)
 
function saveDomainLevels ()
 
function getCurrentLevelJSON (url)
 
function getTweaksForLevel (level_id, tweaks_obj)
 

Variables

var wrapping_groups
 
const L0 = "0"
 
const L1 = "1"
 
const L2 = "2"
 
const L3 = "3"
 
const L_EXPERIMENTAL = "Experiment"
 
var level_0
 Built-in levels.
 
var level_1
 
var level_2
 
var level_3
 
var level_experimental
 
var modify_builtin_levels = modify_builtin_levels || (() => null)
 
var levels = {}
 
var default_level = {}
 
var domains = {}
 
let levels_initialised = false
 
let fp_levels_initialised = false
 
let levels_updated_callbacks = []
 
var tweak_domains = tweak_domains || {}
 

Detailed Description

Operations and data structures connected to protection levels.

Author
Copyright (C) 2019-2021 Libor Polcak
Copyright (C) 2019 Martin Timko
Copyright (C) 2021 Matus Svancar
Copyright (C) 2022 Marek Salon
Copyright (C) 2022 Martin Bednar
Copyright (C) 2023 Martin Zmitko
License:
SPDX-License-Identifier: GPL-3.0-or-later

Function Documentation

◆ are_all_api_unsupported()

function are_all_api_unsupported (   wrappers)

Returns true if all given API wrappers are unsuported.

Here is the call graph for this function:

◆ changedLevels()

function changedLevels (   changed,
  area 
)
Here is the call graph for this function:

◆ getCurrentLevelJSON()

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

◆ getTweaksForLevel()

function getTweaksForLevel (   level_id,
  tweaks_obj 
)
Here is the caller graph for this function:

◆ init_levels()

function init_levels ( )
Here is the caller graph for this function:

◆ is_api_undefined()

function is_api_undefined (   api)

Check if the given API is supported by the browser

Parameters
Stringto the object which presence to check.
Here is the caller graph for this function:

◆ saveDomainLevels()

function saveDomainLevels ( )
Here is the caller graph for this function:

◆ setDefaultLevel()

function setDefaultLevel (   level)
Here is the caller graph for this function:

◆ updateLevels()

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

Variable Documentation

◆ default_level

var default_level = {}

◆ domains

var domains = {}

◆ fp_levels_initialised

let fp_levels_initialised = false

◆ L0

const L0 = "0"

◆ L1

const L1 = "1"

◆ L2

const L2 = "2"

◆ L3

const L3 = "3"

◆ L_EXPERIMENTAL

const L_EXPERIMENTAL = "Experiment"

◆ level_0

var level_0
Initial value:
= {
"builtin": true,
"level_id": L0,
"level_text": browser.i18n.getMessage("JSSL0Name"),
"level_description": browser.i18n.getMessage("JSSL0Description"),
}
const L0
Definition levels.js:774

Built-in levels.

◆ level_1

var level_1
Initial value:
= {
"builtin": true,
"level_id": L1,
"level_text": browser.i18n.getMessage("JSSL1Name"),
"level_description": browser.i18n.getMessage("JSSL1Description"),
"time_precision": 3,
"net": 1,
"webworker": 3,
"geolocation": 3,
"physical_environment": 1,
"useridle": 1,
"coopschedule": 1,
"gamepads": 1,
"vr": 1,
"analytics": 1,
"battery": 1,
"nfc": 1,
}
const L1
Definition levels.js:775

◆ level_2

var level_2
Initial value:
= {
"builtin": true,
"level_id": L2,
"level_text": browser.i18n.getMessage("JSSL2Name"),
"level_description": browser.i18n.getMessage("JSSL2Description"),
"time_precision": 3,
"htmlcanvaselement": 1,
"audiobuffer": 1,
"webgl": 1,
"plugins": 2,
"enumerateDevices": 2,
"hardware": 1,
"net": 1,
"webworker": 3,
"geolocation": 3,
"physical_environment": 1,
"useridle": 2,
"coopschedule": 1,
"gamepads": 1,
"vr": 1,
"analytics": 1,
"battery": 1,
"windowname": 1,
"nfc": 1,
"wasm": 1,
}
const L2
Definition levels.js:776

◆ level_3

var level_3
Initial value:
= {
"builtin": true,
"level_id": L3,
"level_text": browser.i18n.getMessage("JSSL3Name"),
"level_description": browser.i18n.getMessage("JSSL3Description"),
"time_precision": 3,
"htmlcanvaselement": 2,
"audiobuffer": 2,
"webgl": 2,
"plugins": 3,
"enumerateDevices": 3,
"hardware": 3,
"net": 1,
"webworker": 3,
"geolocation": 6,
"physical_environment": 1,
"useridle": 3,
"coopschedule": 1,
"gamepads": 1,
"vr": 1,
"playback": 2,
"analytics": 1,
"battery": 1,
"windowname": 1,
"nfc": 1,
}
const L3
Definition levels.js:777

◆ level_experimental

var level_experimental
Initial value:
= {
"builtin": true,
"level_id": L_EXPERIMENTAL,
"level_text": browser.i18n.getMessage("JSSLexperimentalName"),
"level_description": browser.i18n.getMessage("JSSLexperimentalDescription"),
"time_precision": 3,
"htmlcanvaselement": 2,
"audiobuffer": 2,
"webgl": 2,
"plugins": 3,
"enumerateDevices": 3,
"hardware": 3,
"net": 1,
"xhr": 1,
"arrays": 2,
"shared_array": 2,
"webworker": 2,
"geolocation": 6,
"physical_environment": 1,
"useridle": 3,
"coopschedule": 1,
"gamepads": 1,
"vr": 1,
"playback": 3,
"analytics": 1,
"battery": 1,
"windowname": 1,
"nfc": 1,
}
const L_EXPERIMENTAL
Definition levels.js:778

◆ levels

var levels = {}

◆ levels_initialised

let levels_initialised = false

◆ levels_updated_callbacks

let levels_updated_callbacks = []

◆ modify_builtin_levels

var modify_builtin_levels = modify_builtin_levels || (() => null)

◆ tweak_domains

var tweak_domains = tweak_domains || {}

◆ wrapping_groups

var wrapping_groups

Wrapping groups

Used to control the built-in levels and GUI (e.g. level tweaks).