Greasy Fork

Malayala Kit

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

目前为 2023-12-20 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.cloud/scripts/482771/1299275/Malayala%20Kit.js

作者
garticio
版本
0.0.1.20231220175655
创建于
2023-12-20
更新于
2023-12-20
大小
51.1 KB
许可证
暂无

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: "Buton Label", buttonLabel: "Buton Text", onclick: function () {
        alert("Clicked");
    }
});
general.addSwitch({ label: "Switch Label", value: true, onchange: function (value) {
        alert("Switch 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();