Scratch Addon userscript code example
Example: Scratch Addon userscript
export default async function ({ addon, global, console }) {
// This WON'T work!
sayHello();
}
function sayHello() {
console.log("Hello, " + addon.auth.username);
// Error: addon is not defined!
}