Defending against ClientRects fingerprinting by reporting a fake value.
ClientRects Fingerprint Defender Extension
ClientRects Fingerprint Defender is a browser extension that lets you easily hide your real ClientRects fingerprint by reporting a random fake value.
The native getClientRects() method in JavaScript returns a collection of rectangles (DOMRect objects) that enclose an element border-box in the viewport. Using the metrics from this method (i.e. x, y, width, height, etc.) one can generate a fingerprint to identify users. This add-on adds a small noise to the actual fingerprint and renews it every time you visit a website or reload a page. To disable this add-on, please visit the extensions page in your browser and then click on the disable button. Please note that this add-on does not have any options page.
If you have a feature request or found a bug to report, please fill out the bug report form on the add-on's homepage (https://mybrowseraddon.com/clientrects-defender.html).
Read more
The native getClientRects() method in JavaScript returns a collection of rectangles (DOMRect objects) that enclose an element border-box in the viewport. Using the metrics from this method (i.e. x, y, width, height, etc.) one can generate a fingerprint to identify users. This add-on adds a small noise to the actual fingerprint and renews it every time you visit a website or reload a page. To disable this add-on, please visit the extensions page in your browser and then click on the disable button. Please note that this add-on does not have any options page.
If you have a feature request or found a bug to report, please fill out the bug report form on the add-on's homepage (https://mybrowseraddon.com/clientrects-defender.html).
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "version": "0.1.0", "manifest_version": 3, "offline_enabled": true, "name": "ClientRects Fingerprint Defender", "homepage_url": "https://mybrowseraddon.com/clientrects-defender.html", "description": "Defending against ClientRects fingerprinting by reporting a fake value.", "commands": { "_execute_action": {} }, "background": { "service_worker": "background.js" }, "permissions": [ "storage", "contextMenus", "notifications" ], "action": { "default_popup": "data/popup/popup.html", "default_title": "ClientRects Fingerprint Defender", "default_icon": { "16": "data/icons/16.png", "32": "data/icons/32.png", "48": "data/icons/48.png", "64": "data/icons/64.png" } }, "content_scripts": [ { "world": "MAIN", "all_frames": true, "matches": ["*://*/*"], "match_about_blank": true, "run_at": "document_start", "match_origin_as_fallback": true, "js": ["data/content_script/page_context/inject.js"] }, { "world": "ISOLATED", "all_frames": true, "matches": ["*://*/*"], "match_about_blank": true, "run_at": "document_start", "match_origin_as_fallback": true, "js": ["data/content_script/inject.js"] } ], "icons": { "16": "data/icons/16.png", "32": "data/icons/32.png", "48": "data/icons/48.png", "64": "data/icons/64.png", "128": "data/icons/128.png" }}
Read more