I am working on an extension for Chrome that would alter my "Hash of WebGL fingerprint" as per https://panopticlick.eff.org/results?aat=1&dnt=111#fingerprintTable
I started off using the code provided in the following link https://intoli.com/blog/making-chrome-headless-undetectable/, basically copying it in my concept.js file, which looks as follows:
const getParameter = WebGLRenderingContext.getParameter;
WebGLRenderingContext.prototype.getParameter = function(parameter) {
// UNMASKED_VENDOR_WEBGL
if (parameter === 37445) {
return 'Intel Open Source Technology Center';
}
// UNMASKED_RENDERER_WEBGL
if (parameter === 37446) {
return 'Mesa DRI Intel(R) Ivybridge Mobile ';
}
return getParameter(parameter);
};
My manifest json is fairly simple and is set to run at document_start, which it does. However, using the above stated extension there is no difference in my WebGL hash. I know that the code in the extension actually runs as I have tested it with a bunch of small javascript alerts.
I am completely at a loss and have worked on this problem for several hours to no avail, all help is greatly appreciatedj
EDIT: For completeness sake following is my manifest.json
{
"manifest_version": 2,
"name": "JavaScript Injection",
"version": "1.0.0",
"content_scripts": [
{
"matches": ["*://*/*"],
"js": ["injected-javascript.js"],
"run_at": "document_start"
}
]
}