forked from FOSS/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",
|
||||
"storage": [
|
||||
{ "name": "swp2clk.boot.js", "url": "boot.js" },
|
||||
{"name":"swp2clk.settings.js","url":"settings.js"},
|
||||
{ "name": "swp2clk.img", "url": "app-icon.js", "evaluate": true }
|
||||
{"name":"swp2clk.settings.js","url":"settings.js"}
|
||||
],
|
||||
"data": [{"name":"swp2clk.data.json"}]
|
||||
}
|
||||
|
|
|
@ -9,4 +9,14 @@ The swipe modes can be configured in the settings app, under "Swipe to Clock".
|
|||
- Always Off: Deactivated for all apps (Default)
|
||||
- White List: Only activate for chosen apps, otherwise deactivated 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 () {
|
||||
var DEBUG = true;
|
||||
var FILE = "swp2clk.data.json";
|
||||
|
|
Loading…
Reference in New Issue