Malayala Kit

MalayalaKit: JavaScript library for creating customizable web menus with tabs, buttons, switches, and input elements.

目前為 2023-12-21 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/482771/1299510/Malayala%20Kit.js

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
garticio
版本
0.0.1.20231221085530
建立日期
2023-12-20
更新日期
2023-12-21
尺寸
53.0 KB
授權條款
未知

MalayalaKit is a lightweight JavaScript library designed to facilitate the creation of customizable and interactive menus for web applications. It offers a simple and intuitive API for constructing menus with tabs, buttons, switches, and input elements. The library provides a set of predefined styles for a sleek and modern appearance.

Key Features:

  1. Tabs: Easily organize content into tabs for a structured user interface.
  2. Buttons: Add interactive buttons with customizable labels and actions.
  3. Switches: Incorporate toggle switches for binary options.
  4. Input Elements: Create input fields with various types and customizable attributes.

The library's design allows developers to quickly integrate and configure menus within their web projects. It includes built-in styling for a visually appealing experience, but developers can also customize the appearance to suit their application's design.

To use MalayalaKit, developers can instantiate a menu, add tabs with associated content, and include buttons, switches, and input elements within each tab. The library simplifies the process of creating dynamic and responsive menus for web applications.

Example

var kit = new MalayalaKit.CreateMenu({
    title: "MalayalaKit",
    icon: "",
    size: { width: 500, height: 400 },
    position: { top: 50, left: 50 },
    hotkey: { keyCode: 77, ctrlKey: true, altKey: false, shiftKey: false }
});

var general = new MalayalaKit.Tab("General");
general.addButton({ label: "Button Label", buttonLabel: "Buton Text", onclick: function () {
        alert("Clicked");
    }
});
general.addSwitch({ label: "Switch Label", value: true, onchange: function (value) {
        alert("Switch value: " + value);
    }
});
tab1.addInput({ label: "Number Input", placeholder: "Enter a Number", type: "number",value: 0, onchange: function (value) {
    alert("Number input value: " + value);
}
});
kit.addTab(general);

var tab2 = new MalayalaKit.Tab("Tab 2");
tab2.addButton({ buttonLabel: "Hide", onclick: function () {
        kit.toggleMenu();
    }
});
kit.addTab(tab2);

kit.render();