classic-lite

Minimalist rewrite of Łukasz Zalewski's "classic" pebble watchface
git clone https://git.instinctive.eu/classic-lite.git
Log | Files | Refs | README | LICENSE

commit 74bf3e8c879c7c601b1559131f06e4235bf75f5e
parent db72f2be5b819fedd06e95e6641cfcc97c4e9e72
Author: Natasha Kerensikova <natacha@instinctive.eu>
Date:   Fri, 18 Dec 2015 20:20:43 +0000

Display the (hard-coded) installed version on the configuration page
Diffstat:
Mconfig.html | 5+++++
Msrc/js/pebble-js-app.js | 6++----
2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/config.html b/config.html @@ -153,6 +153,11 @@ document.getElementById("bluetoothVibration").checked = (parseInt(getQueryParam("vibrate", "1")) > 0); document.getElementById("textColorPicker").value = getQueryParam("textcol", "0x000000"); document.getElementById("textFormat").value = getQueryParam("textfmt", "Pebble"); + + const versionTag = getQueryParam("v"); + if (versionTag) { + document.getElementsByTagName("h1")[0].childNodes[0].nodeValue = "Classic Lite " + versionTag; + } </script> </body> </html> diff --git a/src/js/pebble-js-app.js b/src/js/pebble-js-app.js @@ -29,13 +29,11 @@ const settings = { /* "name in local storage": "form input parameter" */ }; function encodeStored(names) { - var first = true; - var result = ""; + var result = "?v=1.2"; for (var key in names) { var value = localStorage.getItem(key); if (value != null) { - result = result + (first ? "?" : "&") + names[key] + "=" + encodeURIComponent(value); - first = false; + result = result + "&" + names[key] + "=" + encodeURIComponent(value); } } return result;