您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Library for adding a user interface to manage settings for grundos.cafe userscripts
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://updategreasyfork.deno.dev/scripts/514423/1554918/GC%20-%20Universal%20Userscripts%20Settings.js
// @require script_url
// @grant GM.getValue (can be made optional)
// @grant GM.setValue (can be made optional)
// @match *://*.grundos.cafe/help/*/
Add your settings by calling addTextInput, addNumberInput, addCheckboxInput, or addDropdown with a configuration object.
categoryName: The name of the category header for which to put the setting underneath.
settingName: This name will be used to get/set the setting unless a currentSetting or callbackFunction, respectively, is given.
labelText: The label text for the setting.
labelTooltip: The tooltip to display for more information when the label is clicked (optional)
defaultSetting: The default setting to show if the key does not exist or no currentSetting is supplied.
currentSetting: The current value of the setting, if none supplied it is retrieved with GM.getValue(settingName, defaultSetting).
callbackFunction: The function to call when the setting is updated. It will be called with settingName and the new value as arguments. If none supplied, the new value will be set with GM.setValue(settingName, value).
Settings will be added to /help/userscripts/ which is linked from various /help/*/ pages.