diff options
| author | Marco Costa | 2018-08-31 02:35:11 -0400 | 
|---|---|---|
| committer | Marco Costa | 2018-08-31 02:35:11 -0400 | 
| commit | f08ecd4ddc55f4a6a17d66590ba57e770eb6f499 (patch) | |
| tree | bd9d3ebf60c54da84b5655ac5c6e5067ce55d1f8 /content_scripts/scroller.coffee | |
| parent | 12ab37b8bc78996443d142d8ef28ee47f725716c (diff) | |
| download | vimium-f08ecd4ddc55f4a6a17d66590ba57e770eb6f499.tar.bz2 | |
Handle scrolling on Reddit redesign
Diffstat (limited to 'content_scripts/scroller.coffee')
| -rw-r--r-- | content_scripts/scroller.coffee | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee index 7202c682..b134dbe1 100644 --- a/content_scripts/scroller.coffee +++ b/content_scripts/scroller.coffee @@ -319,6 +319,15 @@ if DomUtils.isTopFrame() and window.location.host == "twitter.com"          activatedElement = element ? getScrollingElement()          func arguments... +if DomUtils.isTopFrame() and window.location.host in ["reddit.com", "new.reddit.com"] +  for method in ["scrollTo", "scrollBy"] +    do -> +      func = Scroller[method] +      Scroller[method] = -> +        element = document.getElementById "overlayScrollContainer" +        activatedElement = element ? getScrollingElement() +        func arguments... +  root = exports ? (window.root ?= {})  root.Scroller = Scroller  extend window, root unless exports? | 
