mirror of https://github.com/espruino/BangleApps
swp2clk: Remove unused app icon (since we are settings-only). Add comment explaining boot.js code. Add credits and motivation.
parent
a90315ef45
commit
c664e45eb0
|
@ -5075,8 +5075,7 @@
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
{ "name": "swp2clk.boot.js", "url": "boot.js" },
|
{ "name": "swp2clk.boot.js", "url": "boot.js" },
|
||||||
{"name":"swp2clk.settings.js","url":"settings.js"},
|
{"name":"swp2clk.settings.js","url":"settings.js"}
|
||||||
{ "name": "swp2clk.img", "url": "app-icon.js", "evaluate": true }
|
|
||||||
],
|
],
|
||||||
"data": [{"name":"swp2clk.data.json"}]
|
"data": [{"name":"swp2clk.data.json"}]
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,3 +10,13 @@ The swipe modes can be configured in the settings app, under "Swipe to Clock".
|
||||||
- White List: Only activate for chosen apps, otherwise deactivated for all apps.
|
- White List: Only activate for chosen apps, otherwise deactivated for all apps.
|
||||||
- Black List: Only disabled for chosen apps, otherwise activated for all apps.
|
- Black List: Only disabled for chosen apps, otherwise activated for all apps.
|
||||||
- Always On: Active for all apps (Not actually recommended! E.g. Games need to be able to deal with swipe gestures)
|
- Always On: Active for all apps (Not actually recommended! E.g. Games need to be able to deal with swipe gestures)
|
||||||
|
|
||||||
|
## Motivation:
|
||||||
|
|
||||||
|
The goal is to further support touch-only usage of the BangleJS 2 watch. You can use the [Swiper Clock Launch](https://banglejs.com/apps/#swiper%20clock%20launch) or the [Pattern Launcher](https://banglejs.com/apps/#pattern%20launcher) to further enable touch-only support of the watch.
|
||||||
|
|
||||||
|
## Credits:
|
||||||
|
|
||||||
|
Initial creation: [crazysaem](https://github.com/crazysaem)
|
||||||
|
|
||||||
|
Inspired by: [Swiper Clock Launch](https://banglejs.com/apps/#swiper%20clock%20launch)
|
|
@ -1 +0,0 @@
|
||||||
require("heatshrink").decompress(atob("mEwwkE/4A2+cyiJABiMjn4WPiAVCDIUBDBsyiEBiUzAwMzkIHBl4tMBw/yBIIxKkIME+YEEiESIpMBkYGD+MfKQoMEEQcgiYHE+EPAwkxgRJG+RSGC4xJBNYwuGC44wCD4sRG4wXHCAweGC5JABQAhGHC5IpFiDIHC5HzgIEHC5oqE+JeHC5RgDmBkEC5vxgYXZkDdGC5fyLYSOIC5SLDC5MgQJAXDUxHygEAKREQC5XxC4KCIC8xHLO4/ziERiSPTmI4IC4rXGFwMTC5LXDmBsFFwLHINQUDC44uH+fc54XG+LlE+QuFnvM5gXDkArCMYYFCkYsECwIAHSBIsDC5cgLIoVMC4ZgFC6PziJIFLpYXDJA53PUY6nHZQMvEwwwIa4kxgQmHmUBXoYMHiAMJkJJJIoMSEZIMBgJTG+QJBERAOFiUzAwMzkIgIGJEAgERiIDBFpgYEmQVCiMjCx4AoA="))
|
|
Binary file not shown.
|
@ -1,3 +1,20 @@
|
||||||
|
/**
|
||||||
|
* How does this work?
|
||||||
|
*
|
||||||
|
* Every *boot.js file is executed everytime any app is loaded, including this one.
|
||||||
|
* We just need to figure out which app is currently loaded, in case we are in the white list / black list mode,
|
||||||
|
* to figure out if the swipe handler should be attached or not.
|
||||||
|
* It does not seem to be the case that this can be done easily, but we can work around it.
|
||||||
|
* It seems that every app is loaded via the global "load" function, which takes a fileName as it's first parameter to load any app
|
||||||
|
* or the default clock when the fileName is undefined.
|
||||||
|
* To be able to use this for us, we wrap the global "load" function, and determine before loading the next app,
|
||||||
|
* whether the swipe handler should be added or not, since we now know which app will be loaded.
|
||||||
|
* Note: We cannot add the swipe handler inside the wrapped "load" function, because once the "load" function is complete
|
||||||
|
* everything is cleaned up. That's why we merely save a flag, whether the swipe handler should be attached or not,
|
||||||
|
* which is evaluated once this file is executed again, which will be right after the load function completes
|
||||||
|
* (since every *boot.js file is executed everytime any app is loaded).
|
||||||
|
*/
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
var DEBUG = true;
|
var DEBUG = true;
|
||||||
var FILE = "swp2clk.data.json";
|
var FILE = "swp2clk.data.json";
|
||||||
|
|
Loading…
Reference in New Issue