Page 1 of 1

New Addon

Posted: Sat Aug 05, 2023 4:06 am
by lunch
I am trying to make a new addon.

At the moment i try to understand the system and copied the following code from the developer website.

// Execute when the window is ready
window.whenReady(() => {
uitools.toastMessage.show('Hello world!', {
disableUndo: true
});
});

So far ist everything ok, but there is no message.

What is the problem?
Wrong sample, toastMessage doesn't work.

How to i have to understand that.

Thanks
Wolfgang

Re: New Addon

Posted: Tue Aug 15, 2023 1:01 am
by drakinite
Hey, sorry for the delayed reply. Where are you putting the code?

I often prefer to test code in the bundled Chromium developer console. If you install a debug build, you can right click anywhere and click Inspect Element, giving you access to the console.

If you don't see a toast message, then that means your code just isn't running. I copied and pasted it into the console just now, and it works as expected for me. Have you verified that the test addon you created shows up in Tools -> Addons after you installed it?