diff options
| author | Jez Ng | 2012-01-21 16:07:28 +0800 |
|---|---|---|
| committer | Jez Ng | 2012-01-22 00:31:49 +0800 |
| commit | 8548fcc5b31526706afb89712804c60cf8d91fbf (patch) | |
| tree | 105a8f975bfdaa578cce089f13f0ff619b0f18e8 | |
| parent | 36040abd6e3bbff1ead78493047da0daf6a7a0a0 (diff) | |
| download | vimium-8548fcc5b31526706afb89712804c60cf8d91fbf.tar.bz2 | |
Treat navigation queries starting with slashes as file URIs.
| -rw-r--r-- | lib/utils.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js index efdb49fb..6526fe89 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -105,6 +105,9 @@ var utils = { // trim str str = str.replace(/^\s+|\s+$/g, ''); + if (str[0] === '/') + return "file://" + str; + // it starts with a scheme, so it's definitely an URL if (/^[a-z]{3,}:\/\//.test(str)) return str; |
