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

Wrappers for NavigatorPlugins. More...

Variables

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

Detailed Description

Wrappers for NavigatorPlugins.

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

This file contains wrappers for NavigatorPlugins. See the MDN docs on the plugins and MIME types.

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 available here.

The purpose of the wrappers is solely to prevent fingerprinting. However, browsers modyfing the array stand out of the crowd, which makes them more fingerprintable. Consequently, JShelter does not modify an empty list. So no matter the configuration, an empty list is not populated by the wrappers.

If PDF inline viewing is supported, Firefox returns 5 plugins:

  • "PDF Viewer"
  • "Chrome PDF Viewer"
  • "Chromium PDF Viewer"
  • "Microsoft Edge PDF Viewer"
  • "WebKit built-in PDF"

A list containing exactly these plugins is treated as the empty list and it is not modified.

Variable Documentation

◆ fakes

var fakes = fakeMime + fakePlugin + fakePluginArrayF + fakeMimeTypeArrayF

◆ farbles

var farbles = farblePlugin + farbleMime

◆ wrappers

var wrappers