sorz / accept-language-per-site

Firefox extension to change Accept-Language for different sites.
MIT License
23 stars 0 forks source link

Change navigator.language in addition to Accept-Language header #6

Open DDoerner opened 10 months ago

DDoerner commented 10 months ago

I know that this extends the original scope, but since more and more websites switch to recognizing the users language not via the header but via the Navigator API, it would be useful if this extension could also manipulate this API on the set domains.

sorz commented 10 months ago

By a quick skimming of extension document, I can't found a quick way to intercept/modify browser API with extension. Injecting a script that create a proxy object of navigator may work? I'm not sure about it.

SaltfishAmi commented 5 months ago

Maybe you can get some inspiration from this other extension that does the same job?

https://github.com/locale-switcher/locale-switcher/blob/main/src/background/index.ts