Unlike navigator.userAgent
, which can be overriden by other extensions/userscripts
or by devtools in device-emulation mode, GM_info.platform
is more reliable as the
data is obtained in the background page of Violentmonkey using a specialized
extension API (browser.runtime.getPlatformInfo
and getBrowserInfo
).
Contains structured fields from the Metadata Block.
The name of userscript manager, which should be the string Violentmonkey
.
The meta block of the script.
Whether the script will be updated automatically.
A copy of navigator.userAgent from the content script of the extension.
VM2.20.2
Optional
userA copy of navigator.userAgentData from the content script of the extension. Not present in browsers that don't implement this API.
VM2.20.2
Unique ID of the script.
Version of Violentmonkey.
The injection mode of current script.