Userscript Manager Detection

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

Устаревшая версия за 16.10.2022. Перейдите к последней версии.

Этот скрипт недоступен для установки пользователем. Он является библиотекой, которая подключается к другим скриптам мета-ключом // @require https://updategreasyfork.deno.dev/scripts/453189/1105660/Userscript%20Manager%20Detection.js

Автор
Taureon
Версия
1
Создано
16.10.2022
Обновлено
16.10.2022
Размер
854 байта
Лицензия
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.