Programmatic APIs — JZ and JUSTZIX
JustZix exposes two ready-made helper globals inside every rule script. <code>JZ</code> drives action buttons and <code>JUSTZIX</code> logs straight into the Output Console window — no hand-rolled DOM glue needed.
What the in-page helper API is
Every JavaScript snippet in a JustZix rule — and the code behind every action button — runs in a context where two ready-made globals are waiting for you: window.JZ and window.JUSTZIX. Nothing to import, nothing to load; they are available from the first line of your script.
This is a deliberately small API. Instead of hundreds of methods it gives you two solid anchor points: one to drive action buttons, one to log. Everything else you do with the page's plain JavaScript.
JZ — driving action buttons
The JZ object connects your code to the extension's action buttons. The key methods are:
JZ.click('LBL')— programmatically clicks the action button labelled "LBL".JZ.action('LBL')— returns the button's DOM element, so you can style it or inspect its attributes.JZ.actions()— an array of all visible action buttons.JZ.labels()— an array of the original labels with their casing preserved.
Label lookup is case-insensitive — JZ.click('btn') and JZ.click('BTN') hit the same button.
JUSTZIX — logging to the Output Console
The JUSTZIX object is a logger that writes straight into the extension's Output Console window. It offers JUSTZIX.log(), .warn(), .error(), .info() and .debug() — each appends an entry at the matching level. The aliases __JUSTZIX__ and JZ.log are also at hand.
That means you can trace what a rule is doing without opening DevTools. Messages land in one calm place, separate from the noise of the browser console.
Why a stable API beats hand-rolled DOM glue
You could query for buttons by selector and dispatch your own events, but that code breaks the moment the extension's layout shifts. JZ and JUSTZIX give you a steady contract: the same method name works no matter how the internals change.
Pair it with a mutation observer and you have a real workflow — a rule waits for an element, clicks a series of actions and reports the outcome:
// Action "AUTO" — chain three other actions
JZ.click('LOAD');
setTimeout(() => JZ.click('PROC'), 500);
setTimeout(() => { JZ.click('SAVE'); JUSTZIX.info('done'); }, 1500);
Related blog posts
Posts that cover this topic in more depth.