Make test for using Pale Moon workaround stricter.
This commit is contained in:
parent
50bbb9010f
commit
2a8f6e8cc4
@ -226,8 +226,9 @@ $.event = (event, detail, root=d) ->
|
|||||||
|
|
||||||
<% if (type === 'userscript') { %>
|
<% if (type === 'userscript') { %>
|
||||||
# XXX Make $.event work in Pale Moon with GM 3.x (no cloneInto function).
|
# XXX Make $.event work in Pale Moon with GM 3.x (no cloneInto function).
|
||||||
unless typeof cloneInto is 'function' or /^[01]\./.test(GM_info.version) or GM_info.scriptHandler # not FF30+, GM1-, or Tampermonkey
|
|
||||||
do ->
|
do ->
|
||||||
|
return unless /PaleMoon\//.test(navigator.userAgent) and +GM_info?.version?.split('.')[0] >= 2 and typeof cloneInto is 'undefined'
|
||||||
|
|
||||||
try
|
try
|
||||||
new CustomEvent 'x', detail: {}
|
new CustomEvent 'x', detail: {}
|
||||||
catch err
|
catch err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user