diff options
Diffstat (limited to 'libs/bower_components/mousetrap/plugins/pause')
3 files changed, 0 insertions, 43 deletions
diff --git a/libs/bower_components/mousetrap/plugins/pause/README.md b/libs/bower_components/mousetrap/plugins/pause/README.md deleted file mode 100644 index 0b3b3bd2e3..0000000000 --- a/libs/bower_components/mousetrap/plugins/pause/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Pause/unpause - -This extension allows Mousetrap to be paused and unpaused without having to reset keyboard shortcuts and rebind them. - -Usage looks like: - -```javascript -// stop Mousetrap events from firing -Mousetrap.pause(); - -// allow Mousetrap events to fire again -Mousetrap.unpause(); -``` diff --git a/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.js b/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.js deleted file mode 100644 index ca9cafee4b..0000000000 --- a/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * 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); diff --git a/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.min.js b/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.min.js deleted file mode 100644 index 9b6d67c527..0000000000 --- a/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.min.js +++ /dev/null @@ -1 +0,0 @@ -Mousetrap=function(a){var c=a.stopCallback,b=!0;a.stopCallback=function(a,d,e){return b?c(a,d,e):!0};a.pause=function(){b=!1};a.unpause=function(){b=!0};return a}(Mousetrap); |