From b6fa6c366c1cdccb61b3b89b72827b91824290cd Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Sat, 29 Oct 2016 23:02:49 +0300 Subject: [PATCH] fix #394 Former-commit-id: 58aaacf044fd9c5b13bb3b4f831ce6fc8d8783f2 --- resources/wallet.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/wallet.js b/resources/wallet.js index 740689f6a3..eeab1786a4 100644 --- a/resources/wallet.js +++ b/resources/wallet.js @@ -1,6 +1,13 @@ -function wallet() { +function wallet(params) { var url = 'http://127.0.0.1:3450'; + if (params.url && params.url !== "undefined" && params.url != "") { + url = params.url; + if (!/^[a-zA-Z-_]+:/.test(url)) { + url = 'http://' + url; + } + } + return {webViewUrl: url}; } @@ -11,7 +18,7 @@ status.command({ fullscreen: true, suggestionsTrigger: 'on-send', params: [{ - name: "webpage", + name: "url", suggestions: wallet, type: status.types.TEXT }]