Furaffinity-Custom-Settings

Library to create Custom settings on Furaffinitiy

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/475041/1803330/Furaffinity-Custom-Settings.js

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Midori Dragon
版本
4.3.6
建立日期
2023-09-11
更新日期
2026-04-19
尺寸
49.9 KB
授權條款
MIT

Furaffinity Custom Settings

Helper Library to create Custom settings on FurAffinity.

See documentation on Furaffinity-Custom-Settings.

How to use

  • @require this script

  • Create a Settings Object:

    // Constructor takes provider name (navigation entry) and header name (settings page title)
    const customSettings = new FACustomSettings("Midori's Script Settings", "My Script Settings");
    // Multiple Settings Pages can be created with different provider/header combinations
    


  • Create a new Setting:

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

    See Furaffinity-Custom-Settings for more info

  • Trigger when settings should be loaded:

    customSettings.loadSettings(); // 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 with multiple options) ✅ Completed
Change Settings Page Name and Header Name ✅ Completed
Have multiple different Setting Pages ✅ Completed
Import and Export Settings ✅ Completed