CAI Universal Toolbelt Menu

Reusable menu structure for various c.ai TM scripts that require a menu

As of 2023-05-12. See the latest version.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/466064/1189817/CAI%20Universal%20Toolbelt%20Menu.js

Author
notdoingthateither
Version
0.0.1.20230512204405
Created
2023-05-11
Updated
2023-05-12
License
MIT

Usage:

const btn = CAIToolMenu.newButton();
btn.innerHTML = 'Do';
btn.onclick = () => {
  console.log('It's doing stuff');

  // optional hide menu after button pressed
  CAIToolMenu.showMenu(false);
}