Userscript Manager Detection

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

2022-10-16 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://updategreasyfork.deno.dev/scripts/453189/1105660/Userscript%20Manager%20Detection.js

लेखक
Taureon
आवृत्ती
1
बनवली
2022-10-16
अपडेट केली
2022-10-16
आकार
854 Bytes
License
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 file.
  • Get isInUserscriptContext anytime when required.