diff options
| author | Jez Ng | 2012-07-07 02:48:30 -0700 |
|---|---|---|
| committer | Jez Ng | 2012-07-07 02:57:11 -0700 |
| commit | e1c6290722343ed2fab1b63f3c925b6102c080e6 (patch) | |
| tree | 0db7e0f94ec492e1f55fdf72d3e0ab4dbeb6777a | |
| parent | cf958db095cc28d68bc5dda5aa30d16a605bf812 (diff) | |
| download | vimium-e1c6290722343ed2fab1b63f3c925b6102c080e6.tar.bz2 | |
eval bookmarklets -- setting window.location doesn't always work.
| -rw-r--r-- | content_scripts/vomnibar.coffee | 4 |
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" |
