diff --git a/lib/url_utils.js b/lib/url_utils.js index 1ffcd8c32..66261dbae 100644 --- a/lib/url_utils.js +++ b/lib/url_utils.js @@ -126,7 +126,7 @@ const UrlUtils = { }, // Create a search URL from the given :query (using either the provided search URL, or the default - // one). It would be better to pull the default search engine from chrome itself. However, chrome + // one). It would be better to pull the default search engine from Chrome itself. However, Chrome // does not provide an API for doing so. createSearchUrl(query, searchUrl) { if (searchUrl == null) { diff --git a/pages/vomnibar.js b/pages/vomnibar.js index 14983e62f..5f8be2357 100644 --- a/pages/vomnibar.js +++ b/pages/vomnibar.js @@ -378,10 +378,10 @@ class VomnibarUI { } launchUrl(url, openInNewTab) { - // If the URL is a bookmarklet (so, prefixed with "javascript:"), then we always open it in the + // If the URL is a bookmarklet (so, prefixed with "javascript:"), then always open it in the // current tab. - if (openInNewTab) { - openInNewTab = !Utils.hasJavascriptPrefix(url); + if (openInNewTab && Utils.hasJavascriptPrefix(url)) { + openInNewTab = false; } chrome.runtime.sendMessage({ handler: openInNewTab ? "openUrlInNewTab" : "openUrlInCurrentTab",