From b9bcd8faf5d693bb6925f6845bd8c60221ef61ff Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 16 Feb 2016 10:56:19 +1300 Subject: [PATCH 1/2] Add the option to not send the current options in the url hash When using data URLs, sending the options in the URL hash will break the URL --- src/js/settings/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/settings/settings.js b/src/js/settings/settings.js index a47bbc47..b03ec734 100644 --- a/src/js/settings/settings.js +++ b/src/js/settings/settings.js @@ -165,7 +165,7 @@ Settings.onOpenConfig = function(e) { return; } var hash = encodeURIComponent(JSON.stringify(options)); - Pebble.openURL(url + '#' + hash); + Pebble.openURL(url + (listener.params.noHash ? '' : '#' + hash)); }; Settings.onCloseConfig = function(e) { From 0fd64936eb2ecf93d8fc461efba1a69205636ae2 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 28 Feb 2016 09:32:23 +1300 Subject: [PATCH 2/2] Change noHash to hash: false --- src/js/settings/settings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/settings/settings.js b/src/js/settings/settings.js index b03ec734..1dff6bec 100644 --- a/src/js/settings/settings.js +++ b/src/js/settings/settings.js @@ -164,8 +164,9 @@ Settings.onOpenConfig = function(e) { options = Settings.getBaseOptions(); return; } - var hash = encodeURIComponent(JSON.stringify(options)); - Pebble.openURL(url + (listener.params.noHash ? '' : '#' + hash)); + if (listener.params.hash !== false) + url += '#' + encodeURIComponent(JSON.stringify(options)); + Pebble.openURL(url); }; Settings.onCloseConfig = function(e) {