aboutsummaryrefslogtreecommitdiffstats
path: root/pages/vomnibar.coffee
diff options
context:
space:
mode:
authorShrikant Sharat2013-12-27 10:05:41 +0530
committermrmr19932014-09-17 22:54:09 +0100
commitf9cb424fad03042353e8720398b390dd8b2281d0 (patch)
tree8ea777bfea483f3840eeaaa3ebae478ad218e503 /pages/vomnibar.coffee
parent5885bc779bed46dfcff4b1e82968151448569f9f (diff)
downloadvimium-f9cb424fad03042353e8720398b390dd8b2281d0.tar.bz2
Allow open popups from bookmarklets. Fix #968.
Use the `openUrlInCurrentTab` message to open bookmarklets so they are opened via `chrome.tabs.update` instead of an injected script element. This allows bookmarklets to open popups.
Diffstat (limited to 'pages/vomnibar.coffee')
-rw-r--r--pages/vomnibar.coffee5
1 files changed, 2 insertions, 3 deletions
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,