GC - Universal Userscripts Settings

Library for adding a user interface to manage settings for grundos.cafe userscripts

目前为 2024-10-28 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/514423/1472892/GC%20-%20Universal%20Userscripts%20Settings.js

作者
CrystalFlame
版本
0.0.1.20241028045914
创建于
2024-10-28
更新于
2024-10-28
大小
9.1 KB
许可证
暂无

GC - Universal Userscripts Settings

Setup:
// @require script_url
// @grant GM.getValue (can be made optional)
// @grant GM.setValue (can be made optional)
// @match *://*.grundos.cafe/help/*/

Usage:
Add your settings by calling addTextInput, addNumberInput, addCheckboxInput, or addDropdown.

Common Parameters:
categoryName: The name of the category for which to put the setting underneath.
settingName: This name will be used to save the setting with GM.setValue
labelText: The label text for the setting.
currentSetting: The current value of the setting, if none supplied it is retrieved with GM.getValue(settingName).
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).

User Interface:
Settings will be added to /help/userscripts/ which is linked from various /help/*/ pages.

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址