Userscript Manager Detection

A Code Snippet for detecting if the script is being ran in an Userscript Manager.

As of 18. 10. 2022. See the latest version.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greatest.deepsurf.us/scripts/453189/1106477/Userscript%20Manager%20Detection.js

Autor
Taureon
Verzija
1
Napravljeno
16. 10. 2022
Ažurirano
18. 10. 2022
Size
787 бајтова
Licenca
Unlicense

A Code Snippet for detecting if the script is being ran in an Userscript Manager. Made by Taureon.

How to use:

  • Add var isInUserscriptContext = typeof GM === 'object' || typeof GM_info === 'object'; to the beginning of your script.
  • Get isInUserscriptContext anytime when required.