mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 03:26:31 +00:00
fix #595
This commit is contained in:
parent
e511baca50
commit
b93cc4669e
@ -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
|
||||
}]
|
||||
|
Loading…
x
Reference in New Issue
Block a user