Work around GM3.0 GM_openInTab bug.
This commit is contained in:
parent
ae9e15478a
commit
d46d02f249
@ -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'
|
||||
<% } %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user