v1.2.2
- ADD: Add new "on_main_menu" callback. 10 main menu items have been created
meaning you can now bind them to global keyboard shortcuts, standard
toolbar buttons, etc and have them run your own custom code. See
docs\callbacks.txt
From callbacks.txt
function on_main_menu(index) {}
/*
On the main menu>File>JScript Panel, there are 10 menu items and whichever number
is selected is sent as the "index" to this callback. Being main menu items now means you
can bind them to global keyboard shortcuts, standard toolbar buttons, panel stack splitter
buttons, etc. Remember to think carefully about where you use this code as you probably only
want it to run once and so don't include it in common files and scripts where you might have
multiple instances. Also, you should avoid sharing scripts containing this code so as not
to conflict with what other users may already be using.
Example:
function on_main_menu(index) {
switch (index) {
case 1: // triggered when File>Jscript Panel>1 is run
do_something();
break;
case 2: // triggered when File>Jscript Panel>2 is run
do_something_else();
break;
}
}
*/
https://github.com/19379/foo-jscript-panel/releases
Also available on the official components site or updating through foobar itself.