-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a GM_info.userAgentData
like API to get browser and OS info reliably
#1728
Comments
GM_info.platform
like API to get browser and OS info reliablyGM_info.userAgent
like API to get browser and OS info reliably
Should be fixed at 4.19.6178 (crx|xpi) I decided to go with export type UserAgentInfo = {
platform: {
arch: string, // 'arm' | 'x86-32' | 'x86-64' ...,
os: string // 'android' | 'linux' | 'mac' | 'win' ...
},
browser: {
name: string, // 'chrome' | 'firefox' ...
version: string,
vendor: string
}
}; Chrome/Edge users, please download the crx file linked above and drag and drop it to the extensions page For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version. |
GM_info.userAgent
like API to get browser and OS info reliablyGM_info.userAgentData
like API to get browser and OS info reliably
ViolentMonkey first introduces such browser checking API (as well as OS and arch checking).
Are you considering keeping the same GM_info API as ViolentMonkey, thus maximizing the compatibility of user scripts? |
It was proposed in the discussion to use the |
Could someone explain what has changed, with examples, please? |
navigator.userAgent
is not reliable since it may be changed by another browser extension.It seems there is no reliable way to get browser and OS info via TM API.
ViolentMonkey has such an API:
https://violentmonkey.github.io/api/gm/#gm_info
The text was updated successfully, but these errors were encountered: