This commit is contained in:
Roman Volosovskyi 2017-01-02 10:17:44 +02:00
parent e511baca50
commit b93cc4669e
1 changed files with 9 additions and 1 deletions

View File

@ -15,7 +15,15 @@ status.command({
params: [{
name: "url",
suggestions: function(params, context) {
return {webViewUrl: "dapp-url"};
var url = "dapp-url";
if (params.url && params.url !== "undefined" && params.url != "") {
url = params.url;
if (!/^[a-zA-Z-_]+:/.test(url)) {
url = 'http://' + url;
}
}
return {webViewUrl: url};
},
type: status.types.TEXT
}]