diff options
| author | Stephen Blott | 2015-01-03 19:00:49 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2015-01-03 19:00:49 +0000 | 
| commit | f165fb17bfacf5c7c1b51566a0a8583609d3acf0 (patch) | |
| tree | efde76063246271bc199d88ac8bff1422fa25047 | |
| parent | 2f5d2fd957117c52a4d395bc43cad61103b72b32 (diff) | |
| download | vimium-f165fb17bfacf5c7c1b51566a0a8583609d3acf0.tar.bz2 | |
Modes; comment out some unused code.
| -rw-r--r-- | content_scripts/mode.coffee | 28 | 
1 files changed, 20 insertions, 8 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index e4e2679d..01427914 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -74,14 +74,14 @@ class SingletonMode extends Mode      SingletonMode.instances[@singleton] = @      super options -# MultiMode is a collection of modes which are installed or uninstalled together. -class MultiMode extends Mode -  constructor: (modes...) -> -    @modes = (new mode() for mode in modes) -    super {name: "multimode"} - -  exit: -> -    mode.exit() for mode in modes +# # MultiMode is a collection of modes which are installed or uninstalled together. +# class MultiMode extends Mode +#   constructor: (modes...) -> +#     @modes = (new mode() for mode in modes) +#     super {name: "multimode"} +#  +#   exit: -> +#     mode.exit() for mode in modes  # When the user clicks anywhere outside of the given element, the mode is exited.  class ConstrainedMode extends Mode @@ -101,6 +101,18 @@ class ConstrainedMode extends Mode        node = node.parentNode      false +# # The mode exits when the user hits Esc. +# class ExitOnEscapeMode extends Mode +#   constructor: (options) -> +#     super options +#  +#     # This handler ends up above the mode's own handlers on the handler stack, so it takes priority. +#     @handlers.push handlerStack.push +#       "keydown": (event) => +#         return @continueBubbling unless KeyboardUtils.isEscape event +#         @exit() +#         @suppressEvent +  root = exports ? window  root.Mode = Mode  root.SingletonMode = SingletonMode  | 
