MalayalaKit: JavaScript library for creating customizable web menus with tabs, buttons, switches, and input elements.
目前為
此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/482771/1299510/Malayala%20Kit.js
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:
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.
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();