Skip to content

Commit

Permalink
doc: GM_info.isIncognito
Browse files Browse the repository at this point in the history
Co-authored-by: tophf <[email protected]>
  • Loading branch information
Axotot1 and tophf authored Oct 12, 2023
1 parent e8445da commit d169b30
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/api/gm.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ An object that exposes information about the current userscript. It has followin

Version of Violentmonkey.

- <Field name="isIncognito" type="boolean" comment="since VM2.15.4" />

True when this is an incognito profile (Chrome) or private mode (Firefox).

- <Field name="platform" type="object" comment="since VM2.12.4" />

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).
Expand Down

0 comments on commit d169b30

Please sign in to comment.