Device memory

This file contains a wrapper for navigator.deviceMemory.

The goal is to prevent fingerprinting by modifying the return value of the navigator.deviceMemory parameter.

This wrapper operates with three levels of protection:

  • (0) - return random valid value from range [0.25 - real value]
  • (1) - return random valid value from range [0.25 - 8]
  • (2) - return 4

These approaches are inspired by the algorithms created by Brave Software available here.