aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorJez Ng2012-07-07 02:48:30 -0700
committerJez Ng2012-07-07 02:57:11 -0700
commite1c6290722343ed2fab1b63f3c925b6102c080e6 (patch)
tree0db7e0f94ec492e1f55fdf72d3e0ab4dbeb6777a /content_scripts
parentcf958db095cc28d68bc5dda5aa30d16a605bf812 (diff)
downloadvimium-e1c6290722343ed2fab1b63f3c925b6102c080e6.tar.bz2
eval bookmarklets -- setting window.location doesn't always work.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/vomnibar.coffee4
1 files changed, 2 insertions, 2 deletions
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee
index 30615433..146a8aa8 100644
--- a/content_scripts/vomnibar.coffee
+++ b/content_scripts/vomnibar.coffee
@@ -200,8 +200,8 @@ extend BackgroundCompleter,
completionActions:
navigateToUrl: (url, openInNewTab) ->
# If the URL is a bookmarklet prefixed with javascript:, we shouldn't open that in a new tab.
- if (url.indexOf("javascript:") == 0)
- window.location = url
+ if url.startsWith "javascript:"
+ eval url["javascript:".length..]
else
chrome.extension.sendRequest(
handler: if openInNewTab then "openUrlInNewTab" else "openUrlInCurrentTab"