From e1c6290722343ed2fab1b63f3c925b6102c080e6 Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Sat, 7 Jul 2012 02:48:30 -0700 Subject: eval bookmarklets -- setting window.location doesn't always work. --- content_scripts/vomnibar.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content_scripts') 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" -- cgit v1.2.3