From 3e9898d86c221b162d7ec636b3079be58e453e65 Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Fri, 9 Dec 2016 11:55:11 +0100 Subject: [PATCH] Pebble: call the "ready" method also when returning from the external web browser Additionally don't call decodeURIcomponent as the getURLVariable function already does this. Needed by apps like "slides of time". Closes 454 --- app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 50bab12d..caf39669 100644 --- a/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js +++ b/app/src/main/assets/app_config/js/gadgetbridge_boilerplate.js @@ -195,9 +195,10 @@ var storedPreset = GBjs.getAppStoredPreset(); document.addEventListener('DOMContentLoaded', function(){ if (jsConfigFile != null) { loadScript(jsConfigFile, function() { + Pebble.evaluate('ready'); if (getURLVariable('config') == 'true') { showStep("step2"); - var json_string = decodeURIComponent(getURLVariable('json')); + var json_string = getURLVariable('json'); var t = new Object(); t.response = json_string; if (json_string != '') { @@ -211,7 +212,6 @@ if (jsConfigFile != null) { presetElements[i].style.display = 'none'; } } - Pebble.evaluate('ready'); Pebble.evaluate('showConfiguration'); } });