diff options
Diffstat (limited to 'content_scripts/mode.coffee')
| -rw-r--r-- | content_scripts/mode.coffee | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee new file mode 100644 index 00000000..f7bf9e69 --- /dev/null +++ b/content_scripts/mode.coffee @@ -0,0 +1,12 @@ +root = exports ? window + +class root.Mode + constructor: (onKeydown, onKeypress, onKeyup, @popModeCallback) -> + @handlerId = handlerStack.push + keydown: onKeydown + keypress: onKeypress + keyup: onKeyup + + popMode: -> + handlerStack.remove @handlerId + @popModeCallback() |
