UNPKG
superhuman-mousetrap
Version:
latest (1.5.3-sh.1)
1.5.3-sh.1
Simple library for handling keyboard shortcuts
github.com/superhuman/mousetrap
superhuman/mousetrap
superhuman-mousetrap
/
plugins
/
global-bind
/
mousetrap-global-bind.min.js
2 lines
(1 loc)
•
297 B
JavaScript
View Raw
1
2
(
function
(
a
){
var
c={},d=a.
prototype
.
stopCallback
;a.
prototype
.
stopCallback
=
function
(
e,b,a,f
){
return
this
.
paused
?!
0
:c[a]||c[f]?!
1
:d.
call
(
this
,e,b,a)};a.
prototype
.
bindGlobal
=
function
(
a,b,d
){
this
.
bind
(a,b,d);
if
(a
instanceof
Array
)
for
(b=
0
;b<a.
length
;b++)c[a[b]]=!
0
;
else
c[a]=!
0
};a.
init
()})(
Mousetrap
);