🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

📂 缓存分发状态(共享加速已生效)
🕒 页面同步时间:2026/01/10 01:21:41
🔄 下次更新时间:2026/01/10 02:21:41
手动刷新缓存

Furaffinity-Custom-Settings

Library to create Custom settings on Furaffinitiy

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greasyfork.org/scripts/475041/1617223/Furaffinity-Custom-Settings.js

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Autor
Midori Tsume
Version
4.3.0
Erstellt am
11.09.2023
Letzte Aktualisierung
01.07.2025
Größe
60,6 KB
Lizenz
MIT

Furaffinity Custom Settings

Helper Script to create Custom settings on Furaffinitiy. Also see docs on Furaffinity-Custom-Settings

How to use

  • @require this script
  • Create Settings Object:

    const customSettings = new FACustomSettings(); // Multiple Settings Pages can be created
    customSettings.provider = "Midori's Script Settings"; // Change Navigation Settings Name
    customSettings.headerName = "My Script Settings"; // Change the Settings Header Name
    

    See Settings for more info

  • Create a new Setting:

    const setting = CustomSettings.newSetting(SettingType, "Setting Name");
    setting.description = "Setting Description";
    setting.defaultValue = DefaultValue;
    setting.inInput = (target) => { doSomething(); }; // For Action Settings when clicked otherwise every time the Setting is changed
    setting.addEventListener("input", (target) => { doSomthing(); }); // Alternative to onInput
    setting.verifyRegex = /Regex/; // For Text Settings only
    

    See Settings for more info

  • Trigger when settings should be loaded:

    CustomSettings.loadSettingsMenu(); //loads Navigation Menu & Settings if on Settings Page
    

Feature Roadmap

Feature Status
Create new Settings and easily access Settings change ⠀⠀⠀⠀ ✅ Completed
Have different Setting Types ✅ Completed
⠀⠀⠀⠀Number (TextField that only allows Numbers) ✅ Completed
⠀⠀⠀⠀Boolean (Checkbox with a description) ✅ Completed
⠀⠀⠀⠀Action (Button with a description) ✅ Completed
⠀⠀⠀⠀Text (TextField that allow any Characters) ✅ Completed
⠀⠀⠀⠀Option (Combobox that allows multiple options) ✅ Completed
Change Settings Page Name and Header Name ✅ Completed
Have multiple different Setting Pages ✅ Completed
Import and Export Settings ✅ Completed

Documentation

Setting

The Setting class contains following Properties:

  • id - Can only be set once. Defines the Setting elements html id. Is set to setting Name, if not set manually.
  • name - Name of the Setting.
  • description - Description of the Setting.
  • type - Type of the Setting. (See SettingType for more info)
  • defaultValue - Default value for the Setting. (Is ignored on SettingTypes.Action)
  • action - Action that is executed when the Setting changes. (See Action for more info)
  • value - Current value of the Setting.

  • min - Minimum value for SettingType.Number
  • max - Maximum value for SettingType.Number
  • step - Step value for SettingType.Number

  • verifyRegex - Regex for validation of input for SettingType.Text

SettingType

SettingType can have the following values:

  • SettingType.Number - A TextField that only accepts Numbers. (Enables min, max, step)
  • SettingType.Text - A TextField that allows any Character. (Enables verifyRegex)
  • SettingType.Boolean - A Checkbox with a description.
  • SettingType.Action - A Button with a certain Action. (Value returns the name)
  • SettingType.Option - A Combobox with multiple Options

Input

The onInput Property defines a Function that is executed when the Setting changed. It receives the Settings Element as a Parameter. It can also be used with addEventListener. Example:

customSetting.onInput = (target) => {
  console.log(target.value); // Target is the HTML Element of the Setting
};
customSetting.addEventListener("input", (target) => {
  console.log(target.value);
});

Here every time the Checkbox is clicked the program prints out wether it is checked or not.