A Code Snippet for detecting if the script is being ran in an Userscript Manager.
目前為
此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/453189/1106477/Userscript%20Manager%20Detection.js
A Code Snippet for detecting if the script is being ran in an Userscript Manager. Made by Taureon.
How to use:
var isInUserscriptContext = typeof GM === 'object' || typeof GM_info === 'object'; to the beginning of your script.isInUserscriptContext anytime when required.