diff options
| author | mrmr1993 | 2015-05-31 18:10:01 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2015-05-31 18:10:01 +0100 | 
| commit | f09f65c53cddf05544c8fa417bb0d92438c98a63 (patch) | |
| tree | e20e667336002e8d4ea2b242ae26480713953a9c | |
| parent | 7e67c3d36b47641b21ec24be5d8f7af11ad08756 (diff) | |
| download | vimium-f09f65c53cddf05544c8fa417bb0d92438c98a63.tar.bz2 | |
Remove all remaining references to frontend settings
| -rw-r--r-- | content_scripts/scroller.coffee | 7 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 11 | 
2 files changed, 5 insertions, 13 deletions
| diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee index 29142064..81c71fcd 100644 --- a/content_scripts/scroller.coffee +++ b/content_scripts/scroller.coffee @@ -117,8 +117,7 @@ checkVisibility = (element) ->  # CoreScroller contains the core function (scroll) and logic for relative scrolls.  All scrolls are ultimately  # translated to relative scrolls.  CoreScroller is not exported.  CoreScroller = -  init: (frontendSettings) -> -    @settings = frontendSettings +  init: ->      @time = 0      @lastEvent = null      @keyIsDown = false @@ -215,11 +214,11 @@ CoreScroller =  # Scroller contains the two main scroll functions which are used by clients.  Scroller = -  init: (frontendSettings) -> +  init: ->      handlerStack.push        _name: 'scroller/active-element'        DOMActivate: (event) -> handlerStack.alwaysContinueBubbling -> activatedElement = event.target -    CoreScroller.init frontendSettings +    CoreScroller.init()    # scroll the active element in :direction by :amount * :factor.    # :factor is needed because :amount can take on string values, which scrollBy converts to element dimensions. diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 5655ef61..b6c61c04 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -46,9 +46,6 @@ textInputXPath = (->  # must be called beforehand to ensure get() will return up-to-date values.  #  settings = -  isLoaded: false -  port: null -  eventListeners: {}    values:      scrollStepSize: null      linkHintCharacters: null @@ -64,10 +61,6 @@ settings =      grabBackFocus: null      searchEngines: null -  init: -> -    @port = true -    Settings.init() -  #  # Give this frame a unique (non-zero) id.  # @@ -98,7 +91,7 @@ class GrabBackFocus extends Mode        # An input may already be focused. If so, grab back the focus.        @grabBackFocus document.activeElement if document.activeElement -    if settings.isLoaded then activate() else Settings.addEventListener "load", activate +    if Settings.isLoaded then activate() else Settings.addEventListener "load", activate    grabBackFocus: (element) ->      return @continueBubbling unless DomUtils.isEditable element @@ -147,7 +140,7 @@ window.initializeModes = ->    new NormalMode    new PassKeysMode    new InsertMode permanent: true -  Scroller.init settings +  Scroller.init()  #  # Complete initialization work that sould be done prior to DOMReady. | 
