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

Main background script. More...

Functions

function updateBadge (text, tabid)
 
function tabUpdate (tabid, changeInfo)
 
function cspRequestProcessor (details)
 
 if (typeof browser_polyfill_used !=="undefined" &&browser_polyfill_used)
 
function async connected (port)
 

Variables

var queryInfo
 
const scriptSrcRegex = /script-src\s/
 

Detailed Description

Main background script.

Author
Copyright (C) 2019 Libor Polcak
Copyright (C) 2019 Martin Timko
Copyright (C) 2023 Martin Zmitko
License:
SPDX-License-Identifier: GPL-3.0-or-later

Function Documentation

◆ connected()

function async connected (   port)

Create a port to popup window

The communication cannels are mostly used because browser.runtime.getBackgroundPage() does not work as expected. See also https://bugzilla.mozilla.org/show_bug.cgi?id=1329304.

Here is the call graph for this function:

◆ cspRequestProcessor()

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

◆ if()

if (   typeof browser_polyfill_used ! = = "undefined" && browser_polyfill_used)
Here is the call graph for this function:

◆ tabUpdate()

function tabUpdate (   tabid,
  changeInfo 
)
Here is the call graph for this function:

◆ updateBadge()

function updateBadge (   text,
  tabid 
)

Variable Documentation

◆ queryInfo

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

◆ scriptSrcRegex

const scriptSrcRegex = /script-src\s/