JavaScript Restrictor
Browser extension that improves privacy and security
wrappingS-NP.js File Reference

Wrappers for NavigatorPlugins. More...

Functions

 add_wrappers (wrappers)
 

Variables

var farbles = farblePlugin + farbleMime
 
var fakes = fakeMime + fakePlugin + fakePluginArray + fakeMimeTypeArrayF
 
var wrappers
 

Detailed Description

Wrappers for NavigatorPlugins.

Author
Copyright (C) 2021 Matus Svancar
License:
SPDX-License-Identifier: GPL-3.0-or-later
License:
SPDX-License-Identifier: MPL-2.0

This file contains wrappers for NavigatorPlugins

The goal is to prevent fingerprinting by modifying value returned by getters navigator.plugins and navigator.mimeTypes

This wrapper operates with three levels of protection:

  • (0) - replace by shuffled edited PluginArray with two added fake plugins, edited MimeTypeArray
  • (1) - replace by shuffled PluginArray with two fake plugins, empty MimeTypeArray
  • (2) - replace by empty PluginArray and MimeTypeArray

These approaches are inspired by the algorithms created by Brave Software https://brave.com available at https://github.com/brave/brave-core/blob/master/chromium_src/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc

Function Documentation

◆ add_wrappers()

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.

Variable Documentation

◆ fakes

var fakes = fakeMime + fakePlugin + fakePluginArray + fakeMimeTypeArrayF

◆ farbles

var farbles = farblePlugin + farbleMime

◆ wrappers

var wrappers