diff options
author | brantje <brantje@gmail.com> | 2017-02-21 01:44:00 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2017-02-22 20:02:55 +0300 |
commit | 9ddbf40cce506ee0262d6aa3ff1dd2c0fd41266a (patch) | |
tree | 87f5aeda0795efb6e411dab6cbe4ae7bdf84b287 /js/app/directives | |
parent | 925897b8eeeabb1f09307e50e4bb10eae57f65e6 (diff) |
Add http protocol if its missing
Diffstat (limited to 'js/app/directives')
-rw-r--r-- | js/app/directives/credentialfield.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/app/directives/credentialfield.js b/js/app/directives/credentialfield.js index 8d509830..44878603 100644 --- a/js/app/directives/credentialfield.js +++ b/js/app/directives/credentialfield.js @@ -67,7 +67,9 @@ } if (regex.test(scope.value)) { scope.isLink = true; - + if(scope.value.substr(0,4) !== 'http'){ + scope.value = 'http://'+scope.value; + } } } }); |