TackleBox.js is a lightweight plugin to allow developers to quickly assign commonly used functions to a easy-to-use, material design GUI that won't interfere with your current webpage.
- Download local copy of
tacklebox.js. - Add HTML reference to
tacklebox.jsin your current development environment.
- See
sample.htmlorsample_simple.htmlfor examples.
- Open
tacklebox.jsand customize your commonly used functions in the 'Add Functions' section. - Open your app in a browser and use your tacklebox to make your life easier!
The TackleBox can also be modified in the console. The primary TackleBox object, tacklebox, can be manipulated using all of the functions in our API.
Tacklebox functionality has been implemented within the primary TackleBox object. The TackleBox object has the following functions:
@param string btn_name //Name to display on the button
@param string toast_msg //Message to display in the toast message on click. Pass 'null' to display no toast message.
@param function fn //Function to call on button click.
Adds a new button to the TackleBox Pane.
Destroys all DOM elements and event handlers for TackleBox. Functions other than init() will not function correctly after content has been destroyed.
Initializes all DOM elements and event handlers to use TackleBox.
@param string msg //Message to display in toast popup
Opens a toast popup with the provided message. Toast Timeout can be modified with the setToastTimeout function.
@param string btn_id //Id for the button to remove.
Removes an existing button from the TackleBox Pane.
@param int msg //Timeout length (in milliseconds)
Set the duration to display toast popups for the make_toast() function.