tidy examples

master
Gordon Williams 2020-02-07 17:09:18 +00:00
parent 91bb497f71
commit a59ea3eee6
3 changed files with 11 additions and 9 deletions

View File

@ -2,6 +2,7 @@
{ "id": "7chname", { "id": "7chname",
"name": "My app's human readable name", "name": "My app's human readable name",
"icon": "app.png", "icon": "app.png",
"version":"0.01",
"description": "A detailed description of my great app", "description": "A detailed description of my great app",
"tags": "", "tags": "",
"storage": [ "storage": [

View File

@ -2,6 +2,7 @@
{ "id": "7chname", { "id": "7chname",
"name": "My widget's human readable name", "name": "My widget's human readable name",
"icon": "widget.png", "icon": "widget.png",
"version":"0.01",
"description": "A detailed description of my great widget", "description": "A detailed description of my great widget",
"tags": "", "tags": "",
"storage": [ "storage": [

View File

@ -1,16 +1,16 @@
/* run widgets in their own function scope so they don't interfere with /* run widgets in their own function scope so they don't interfere with
currently-running apps */ currently-running apps */
(() => { (() => {
// add the width // add the width
var xpos = WIDGETPOS.tr-24;/*<the widget width>*/; var xpos = WIDGETPOS.tr-24;/*<the widget width>*/;
WIDGETPOS.tr-= 28;/* the widget width plus some extra pixel to keep distance to others */; WIDGETPOS.tr-= 28;/* the widget width plus some extra pixel to keep distance to others */;
// draw your widget at xpos // draw your widget at xpos
function draw() { function draw() {
// add your code // add your code
} }
// add your widget // add your widget
WIDGETS["mywidget"]={draw:draw}; WIDGETS["mywidget"]={draw:draw};
})() })()