GC - Universal Userscripts Settings

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

بۇ قوليازمىنى بىۋاسىتە قاچىلاشقا بولمايدۇ. بۇ باشقا قوليازمىلارنىڭ ئىشلىتىشى ئۈچۈن تەمىنلەنگەن ئامبار بولۇپ، ئىشلىتىش ئۈچۈن مېتا كۆرسەتمىسىگە قىستۇرىدىغان كود: // @require https://update.greasyfork.org/scripts/514423/1473491/GC%20-%20Universal%20Userscripts%20Settings.js

ئاپتورى
CrystalFlame
نەشرى
0.0.1.20241029044628
قۇرۇلغان ۋاقتى
2024-10-28
يېڭىلانغان ۋاقتى
2024-10-29
ئىجازەتنامىسى
يوق

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 with a configuration object.

Common Configuration Fields:

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.
lableTooltip: 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).

User Interface:

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