if (window.location.host=="banglejs.com") { document.getElementById("apploaderlinks").innerHTML = 'This is the official Bangle.js App Loader - you can also try the Development Version for the most recent apps.'; } else if (window.location.host=="espruino.github.io") { document.title += " [Development]"; document.getElementById("apploaderlinks").innerHTML = 'This is the development Bangle.js App Loader - you can also try the Official Version for stable apps.'; } else { document.title += " [Unofficial]"; document.getElementById("apploaderlinks").innerHTML = 'This is not the official Bangle.js App Loader - you can try the Official Version here.'; } var RECOMMENDED_VERSION = "2v08"; // could check http://www.espruino.com/json/BANGLEJS.json for this (function() { let username = "espruino"; let githubMatch = window.location.href.match(/\/(\w+)\.github\.io/); if (githubMatch) username = githubMatch[1]; Const.APP_SOURCECODE_URL = `https://github.com/${username}/BangleApps/tree/master/apps`; })(); function onFoundDeviceInfo(deviceId, deviceVersion) { if (deviceId != "BANGLEJS") { showToast(`You're using ${deviceId}, not a Bangle.js. Did you want espruino.com/apps instead?` ,"warning", 20000); } else if (versionLess(deviceVersion, RECOMMENDED_VERSION)) { showToast(`You're using an old Bangle.js firmware (${deviceVersion}). You can update with the instructions here` ,"warning", 20000); } }