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

Wrappers for NetworkInformation. More...

Functions

function add_wrappers (wrappers)
 

Detailed Description

Wrappers for NetworkInformation.

See also
https://wicg.github.io/netinfo/#networkinformation-interface
Author
Copyright (C) 2022 Libor Polcak
License:
SPDX-License-Identifier: GPL-3.0-or-later

This file contains a wrapper for NetworkInformation.

NetworkInformation allows sites to learn about local network conditions by querying navigator.connection. Fingerprinters can misuse the feature. Long-term observers may learn about traveling patterns through observation of repeated values (for example a network at work, home, travel, etc.).

We implement the same protection as Brave: https://github.com/brave/brave-browser/issues/20122.

navigator.connection === undefined
"connection" in window.navigator === false

Function Documentation

◆ add_wrappers()

function add_wrappers ( wrappers  wrappers)

Adds a list of wrapping objects to the build_wrapping_code.

This function is called from each wrapper in its file.