aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mousetrap/plugins/pause/mousetrap-pause.js
diff options
context:
space:
mode:
authorTeddy Wing2021-03-21 17:23:11 +0100
committerTeddy Wing2021-03-21 17:47:35 +0100
commita129f8e229f16292d65ffd9dcf9f8a585aa3fe8a (patch)
tree02b50df62163bc86570488ecc587489f5c09e3a2 /lib/mousetrap/plugins/pause/mousetrap-pause.js
parent5ba6d5d6b508c535efb4ab43b02c6c21bfd49185 (diff)
downloadPeniquitous-a129f8e229f16292d65ffd9dcf9f8a585aa3fe8a.tar.bz2
Remove Bower-included Mousetrap
Now that we've added Mousetrap via NPM, we can remove the one we installed via Bower and Bower files. Didn't really need to switch to NPM, but I wanted to get a Mousetrap dependency that included its LICENSE file so I could include it in my build.
Diffstat (limited to 'lib/mousetrap/plugins/pause/mousetrap-pause.js')
-rw-r--r--lib/mousetrap/plugins/pause/mousetrap-pause.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/mousetrap/plugins/pause/mousetrap-pause.js b/lib/mousetrap/plugins/pause/mousetrap-pause.js
deleted file mode 100644
index 0138b8a..0000000
--- a/lib/mousetrap/plugins/pause/mousetrap-pause.js
+++ /dev/null
@@ -1,31 +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 */
-(function(Mousetrap) {
- var _originalStopCallback = Mousetrap.prototype.stopCallback;
-
- Mousetrap.prototype.stopCallback = function(e, element, combo) {
- var self = this;
-
- if (self.paused) {
- return true;
- }
-
- return _originalStopCallback.call(self, e, element, combo);
- };
-
- Mousetrap.prototype.pause = function() {
- var self = this;
- self.paused = true;
- };
-
- Mousetrap.prototype.unpause = function() {
- var self = this;
- self.paused = false;
- };
-
- Mousetrap.init();
-}) (Mousetrap);