CAI Universal Toolbelt Menu

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

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/1190599/CAI%20Universal%20Toolbelt%20Menu.js

Author
notdoingthateither
Version
1.1
Created
2023-05-11
Updated
2023-05-14
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);
}