diff options
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? |
