Work around GM3.0 GM_openInTab bug.

This commit is contained in:
ccd0 2015-03-14 23:58:15 -07:00
parent ae9e15478a
commit d46d02f249

View File

@ -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'
<% } %>