- حُلّت
- المُؤرشفة
Get user agent string from console
I open the terminal (I'm using FreeBSD) and I run: `firefox --help` and I get a lot of command line options. However there seems to be no way to simply get the user agent… (read more)
I open the terminal (I'm using FreeBSD) and I run: `firefox --help` and I get a lot of command line options. However there seems to be no way to simply get the user agent string. This is kind of annoying because I might want to plug the current version of my Firefox browser in some automated scripts. At the moment I need to open Firefox, then go to the console and type in: `window.navigator.userAgent` copy the string manually and paste it wherever I want to use it. It would be really nice if there could be an extra option to the `firefox` command, like: `firefox --user-agent` that prints this information in the console. Maybe there's a way, if it is it must be really hidden because I couldn't find relevant information on how to do it.
Kind regards, Lucas.