Browser Fingerprinting & Third-Party Cookies Blocker

Blocks browser fingerprinting and third-party cookies

  1. // ==UserScript==
  2. // @name Browser Fingerprinting & Third-Party Cookies Blocker
  3. // @namespace http://fpxtpc.41
  4. // @version 1.0
  5. // @description Blocks browser fingerprinting and third-party cookies
  6. // @author FortyOne
  7. // @license MIT
  8. // @match *://*/*
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Block third-party cookies
  17. document.cookie = 'sameSite=strict';
  18.  
  19. // Block browser fingerprinting
  20. // Clearing canvas fingerprint
  21. HTMLCanvasElement.prototype.toDataURL = function() {
  22. return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP89PwGHwAFYAJm6ocdgAAAABJRU5ErkJggg==';
  23. };
  24. })();