Skip to content

Commit

Permalink
Remove correct event listener
Browse files Browse the repository at this point in the history
Target and event name were flipped.
  • Loading branch information
nanaya committed Jul 6, 2023
1 parent 8fd3842 commit fdd520f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/js/core-legacy/forum-auto-click.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ export default class ForumAutoClick


onLoad: =>
$.unsubscribe 'scroll', @throttledOnScroll
$(window).off 'osu:page:change', @throttledOnScroll
$.unsubscribe 'osu:page:change', @throttledOnScroll
window.removeEventListener 'scroll', @throttledOnScroll

@nextLink = document.querySelector('.js-forum__posts-show-more--next')
@previousLink = document.querySelector('.js-forum__posts-show-more--previous')

if @nextLink? && @previousLink?
@throttledOnScroll()
$(window).on 'scroll', @throttledOnScroll
$.subscribe 'osu:page:change', @throttledOnScroll
window.addEventListener 'scroll', @throttledOnScroll


onScroll: =>
Expand Down

0 comments on commit fdd520f

Please sign in to comment.