From Sandcat Browser

EDK: HelloWorld

How to make a simple hello world extension


{
 "name": "Hello World Extension",
 "version": "1.0",
 "author": "Me",
 "script": {
  "filename": "hello.lua",
  "init": "Hello:register()",
 }
}


Hello = {}

function Hello:showmsg()
 app.showmessage('Hello World!')
end

function Hello:register() -- will be called during startup
 local html = [[
 <div
 class="button"
 onclick="Hello:showmsg()"
 style="foreground-image: url(Hello.scx#world.png);"
 />
 ]]
 browser.navbar:inserthtml(1,'#toolbar',html)
end

Done! Now try clicking on it.

Retrieved from https://www.syhunt.com/sandcat/index.php?n=EDK.HelloWorld
Page last modified on May 20, 2014, at 05:26 PM