diff --git a/app/src/main/assets/app_config/configure.html b/app/src/main/assets/app_config/configure.html
index ac25d82ce..a4d10e985 100644
--- a/app/src/main/assets/app_config/configure.html
+++ b/app/src/main/assets/app_config/configure.html
@@ -11,11 +11,12 @@
-
+
Url of the configuration:
-
+
+
Incoming configuration data:
diff --git a/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js b/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js
index 760a2ec83..3e025ccb8 100644
--- a/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js
+++ b/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js
@@ -72,9 +72,15 @@ function gbPebble() {
//needs to be called like this because of original Pebble function name
this.openURL = function(url) {
- document.getElementById("config_url").innerHTML=url;
- var UUID = GBjs.getAppUUID();
- this.configurationURL = new Uri(url).addQueryParam("return_to", "gadgetbridge://"+UUID+"?config=true&json=");
+ if (url.lastIndexOf("http", 0) === 0) {
+ document.getElementById("config_url").innerHTML=url;
+ var UUID = GBjs.getAppUUID();
+ this.configurationURL = new Uri(url).addQueryParam("return_to", "gadgetbridge://"+UUID+"?config=true&json=");
+ } else {
+ //TODO: add custom return_to
+ location.href = url;
+ }
+
}
this.getActiveWatchInfo = function() {
@@ -122,7 +128,7 @@ if (jsConfigFile != null) {
Pebble.parseconfig(t);
} else {
document.getElementById('step2').style.display="none";
- Pebble.showConfiguration();
+ Pebble.ready();
}
});
}