JavaScript Restrictor
Browser extension that improves privacy and security
|
Handle domain-specific levels. More...
Functions | |
function | getContentConfiguration (url, frameId, tabId) |
function | contentScriptLevelSetter (message, {frameId, tab}) |
Handle domain-specific levels.
function contentScriptLevelSetter | ( | message, | |
{frameId, tab} | |||
) |
Messaging with content script.
@message The message from content script.
Returns the promise with the message returned to the content script.
function getContentConfiguration | ( | url, | |
frameId, | |||
tabId | |||
) |
Returns the a Promise which resolves to the configuration for the current level to be used by the content script for injection
{url} | string |
isPrivate | bool specifying incognito mode |
Suppose that there is an iframe from domain C nested in an iframe from domain B that is iself nested in a visited domain A.
+---------------------------------------------------------—+
visited domain a.example |
---|
+-----------------------------------------------------—+ |
iframe from domain b.example | ||
---|---|---|
+-------------------------------------------------—+ |
| | | iframe from domain c.example | | | | | | | | | | | +-------------------------------------------------—+ | | | | | | | +-----------------------------------------------------—+ | +---------------------------------------------------------—+
Suppose that B has a user-defined specific level settings, and C does not have a user-defined specific level settings. The iframe of domain B gets the user-defined settings for domain B but the iframe from domain C is set with the level of domain A.