Add files via upload

pull/1886/head
pidajo 2022-05-20 17:59:55 +02:00 committed by GitHub
parent 5726809530
commit 0e45f63f40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 0 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

View File

@ -0,0 +1,44 @@
(function(back) {
var FILE = "pongclock.json";
// Load settings
var settings = Object.assign({
// default values
withWidgets: true,
isInvers: false,
playLocked: true,
}, require('Storage').readJSON(FILE, true) || {});
function writeSettings() {
require('Storage').writeJSON(FILE, settings);
}
// Show the menu
E.showMenu({
"" : { "title" : "Pong Clock" },
"< Back" : () => back(),
'Widgets?': {
value: !!settings.withWidgets, // !! converts undefined to false
format: v => v?"Show":"Hide",
onchange: v => {
settings.withWidgets = v;
writeSettings();
}
},
'Inverted?': {
value: !!settings.isInvers, // !! converts undefined to false
format: v => v?"Yes":"No",
onchange: v => {
settings.withWidgets = v;
writeSettings();
}
},
'On Lock?': {
value: !!settings.isInvers, // !! converts undefined to false
format: v => v?"Play":"Pause",
onchange: v => {
settings.withWidgets = v;
writeSettings();
}
}
});
})/*(load)/**/