diff options
| -rw-r--r-- | lib/utils.coffee | 2 | ||||
| -rw-r--r-- | pages/vomnibar.coffee | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee index a93831d7..5d93ae70 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -26,7 +26,7 @@ Utils = -> id += 1 hasChromePrefix: (url) -> - chromePrefixes = [ "about", "view-source", "chrome-extension", "data" ] + chromePrefixes = ["about:", "view-source:", "chrome-extension:", "data:", "javascript:"] for prefix in chromePrefixes return true if url.startsWith prefix false diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee index 11fb4b65..5cd37db6 100644 --- a/pages/vomnibar.coffee +++ b/pages/vomnibar.coffee @@ -224,9 +224,8 @@ extend BackgroundCompleter, # completionActions: navigateToUrl: (url, openInNewTab) -> - # If the URL is a bookmarklet prefixed with javascript:, we shouldn't open it in a new tab. - if url.startsWith "javascript:" - openInNewTab = false + # If the URL is a bookmarklet prefixed with javascript:, we shouldn't open that in a new tab. + openInNewTab = false if url.startsWith("javascript:") chrome.runtime.sendMessage( handler: if openInNewTab then "openUrlInNewTab" else "openUrlInCurrentTab" url: url, |
