update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
29
www/analytics/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.js
vendored
Normal file
29
www/analytics/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.js
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* adds a pause and unpause method to Mousetrap
|
||||
* this allows you to enable or disable keyboard shortcuts
|
||||
* without having to reset Mousetrap and rebind everything
|
||||
*/
|
||||
/* global Mousetrap:true */
|
||||
Mousetrap = (function(Mousetrap) {
|
||||
var self = Mousetrap,
|
||||
_originalStopCallback = self.stopCallback,
|
||||
enabled = true;
|
||||
|
||||
self.stopCallback = function(e, element, combo) {
|
||||
if (!enabled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return _originalStopCallback(e, element, combo);
|
||||
};
|
||||
|
||||
self.pause = function() {
|
||||
enabled = false;
|
||||
};
|
||||
|
||||
self.unpause = function() {
|
||||
enabled = true;
|
||||
};
|
||||
|
||||
return self;
|
||||
}) (Mousetrap);
|
||||
Loading…
Add table
Add a link
Reference in a new issue