From d46d02f2497240163699782cb55c6480a87d93b8 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 14 Mar 2015 23:58:15 -0700 Subject: [PATCH] Work around GM3.0 GM_openInTab bug. --- src/General/lib/$.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index e690c705b..7991388f2 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -221,7 +221,11 @@ $.event = (event, detail, root=d) -> $.open = <% if (type === 'userscript') { %> - GM_openInTab + if GM_info.version is 'unknown' # GM_info.version is broken in GM3.0 + # XXX https://github.com/greasemonkey/greasemonkey/issues/2094 + (URL) -> $.globalEval "window.open(#{JSON.stringify URL}, '_blank');" + else + GM_openInTab <% } else { %> (URL) -> window.open URL, '_blank' <% } %>