You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know there is already an issue for this open at #6, but it has since been closed and I am not able to reopen it, so I've created a new issue instead.
After reading the aforementioned issue, I did some research to see if it was possible to spoof the value of navigator.userAgent (and the related user agent identifying information on the navigator object itself), and it seems that it may be possible.
A possible solution to spoofing navigator.userAgent is by injecting a script into the page before anything else loads (so that websites' UA detection don't run before spoofing) which then modifies the navigator object itself.
I'm not familiar with creating an extension for Firefox, otherwise I would have created a reproducible example, but I found some resources that could be helpful in doing this:
This seems like a good place to start for injecting a script into a web page.
The injected script can modify the contents of the navigator object by using Object.defineProperty(...).
Doing navigator.userAgent in the console yields Chrome.
Note that there are still other properties on the navigator object that store individual user agent information, such as appCodeName and oscpu, so these will need to be modified in addition to navigator.userAgent.
I hope this helps in coming up with a solution to the problem :)
The text was updated successfully, but these errors were encountered:
I know there is already an issue for this open at #6, but it has since been closed and I am not able to reopen it, so I've created a new issue instead.
After reading the aforementioned issue, I did some research to see if it was possible to spoof the value of
navigator.userAgent
(and the related user agent identifying information on thenavigator
object itself), and it seems that it may be possible.A possible solution to spoofing navigator.userAgent is by injecting a script into the page before anything else loads (so that websites' UA detection don't run before spoofing) which then modifies the navigator object itself.
I'm not familiar with creating an extension for Firefox, otherwise I would have created a reproducible example, but I found some resources that could be helpful in doing this:
This seems like a good place to start for injecting a script into a web page.
The injected script can modify the contents of the navigator object by using Object.defineProperty(...).
An example usage of Object.defineProperty(...):
Object.defineProperty(navigator, 'userAgent', {
value: 'Chrome',
writable: false
});
Doing navigator.userAgent in the console yields Chrome.
Note that there are still other properties on the navigator object that store individual user agent information, such as appCodeName and oscpu, so these will need to be modified in addition to navigator.userAgent.
I hope this helps in coming up with a solution to the problem :)
The text was updated successfully, but these errors were encountered: