Use GM.openInTab when it becomes available.

This commit is contained in:
ccd0 2017-10-02 14:25:00 -07:00
parent 7f53337486
commit 204b0a5334
2 changed files with 4 additions and 1 deletions

View File

@ -61,6 +61,7 @@
"GM.setValue",
"GM.deleteValue",
"GM.listValues",
"GM.openInTab",
"GM.xmlHttpRequest"
],
"min": {

View File

@ -259,7 +259,9 @@ $.modifiedClick = (e) ->
$.open =
<% if (type === 'userscript') { %>
if GM_openInTab?
if GM?.openInTab?
GM.openInTab
else if GM_openInTab?
GM_openInTab
else
(url) -> window.open url, '_blank'