Skip to content

An easy to use javascript api to make modmenus very fast.

Notifications You must be signed in to change notification settings

ZXMushroom63/ModMenuAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

ModMenuAPI

Disclaimer: this is very old and i dont update it.

An easy to use javascript api to make mod-menus for the web easily.

Psst! To see a full example, click here!

How to make a menu (Assuming you ran the code in ModMenuAPI.js):

First, create a list of tabs.
var tabs = new ModMenuTabList();

To add a tab to the list use the following code:
tabs.addTab("About",` <p>Made by Me! Using ZXMushroom63's ModMenu API</p> `);

Then create the mod menu, passing in the tabs variable from earlier.
var modmenu = new ModMenu("Mod Menu", tabs);

To run it, simply use:
modmenu.init()


To have multiple menus on one page you have to give each of them an id.
Modify the third line of code to have an id, where the third input is the id.
var modmenu = new ModMenu("Mod Menu", tabs, "exampleId");


How to style the mod menu


First, to style the menu you have to create a new ModMenuStyle variable.
var style = new ModMenuStyle()

Then, set different aspects using it's functions:
style.setBackgroundColor("red");
style.setHeaderTextColor("#32a852");
style.setWidth("30%");

When you create the modmenu, give it an id and pass in the style object.
var modmenu = new ModMenu("Example Mod Menu", tabs, "InsertIdHere", style)

Then just initialize the mod menu as normal.
modmenu.init()


Known Issues

Certain sites will not allow tabs and buttons to be clicked.
Sites:
  • github.com
  • google.com
  • nearly all *.google.com sites
  • etc.

About

An easy to use javascript api to make modmenus very fast.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published