Skip to content

Instantly share code, notes, and snippets.

@endolith
Last active January 8, 2024 12:31
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save endolith/72ac5e69e037be02b118adbedcdeac59 to your computer and use it in GitHub Desktop.
Save endolith/72ac5e69e037be02b118adbedcdeac59 to your computer and use it in GitHub Desktop.
Adblock ublock kill infinite scrolling
! Title: Finite Scroll (kills infinite scrolling)
! Last modified: 2017-10-24
! Homepage: https://gist.github.com/endolith/72ac5e69e037be02b118adbedcdeac59
! This URL: https://gist.githubusercontent.com/endolith/72ac5e69e037be02b118adbedcdeac59/raw/finite_scroll.txt
! TODO: Add these scripts: https://infinite-scroll.com/
! Forbes infinite scroll (and all other AJAX)
! https://www.reddit.com/r/web_design/comments/4i6bpd/never_ending_scroll_down_on_some_websites_is_it_a/d2w3qj2
||forbes.com$xmlhttprequest
forbes.com###article-container-1
forbes.com###article-container-2
forbes.com###article-container-3
forbes.com###article-container-4
! Works, but slows down browser as it loads each hidden article. Better to block the loading code itself.
reuters.com##.Article_container_1ixvf:nth-of-type(n+2)
abcnews.go.com##.article:nth-of-type(n+2)
thedailybeast.com##.ArticleSidebarWrapper:nth-of-type(n+2)
##.ajax.post.ajax-post
leaf.tv##.component-preloader
leaf.tv###infinite-articles__item--1
leaf.tv###infinite-articles__item--2
leaf.tv###infinite-articles__item--3
leaf.tv###infinite-articles__item--4
inverse.com##.article-stream
mashable.com##.page-container:nth-of-type(n+2)
electronicdesign.com##.processed.jscroll-added
latimes.com##.trb_ar_summary_wrapper
! latimes.com##.trb_ar_summary_wrapper:nth-of-type(n+1)
latimes.com##.trb_ar:nth-of-type(n+2)
slate.com###story-1
slate.com###story-2
slate.com###story-3
slate.com###story-4
blastingnews.com###content-page-p2
blastingnews.com###content-page-p3
blastingnews.com###content-page-p4
blastingnews.com###content-page-p5
@gasull
Copy link

gasull commented Jun 15, 2018

There seems to be a simpler way:

||vice.com$xmlhttprequest

@endolith
Copy link
Author

@gasull That disables all AJAX, though.

@Gittyperson
Copy link

Thanks for this. Looks like Disqus is also involved but have no idea on creating the right rule. Example

@Gittyperson
Copy link

Few more offenders: scrolling1 - scrolling2

@fugitiveMedia
Copy link

Thanks so much for this. I'm using umatrix myself as my ad-blocker, so I just removed xhr permissions from sites that used infinite scrolling. So far that works well but it's a case by case block.

@endolith
Copy link
Author

endolith commented Dec 7, 2023

Sorry I don't maintain this. I should make it into a proper repo so people can submit PRs?

@gasull
Copy link

gasull commented Dec 12, 2023

Sorry I don't maintain this. I should make it into a proper repo so people can submit PRs?

A long time ago I created a repo for infinite scrolling. I update it infrequently.

@gasull
Copy link

gasull commented Dec 12, 2023

@gasull That disables all AJAX, though.

I don't need AJAX on a news website. Once the article has loaded there's no reason for the page to make any new request. It's a waste of my bandwidth.

@fugitiveMedia
Copy link

Yeah I only need a tenth of the AJAX calls being done on a site:) Loading a video about a related article, getting a full list of the top articles now, no thanks. It all click bait to increase the sites search engine rankings

@fugitiveMedia
Copy link

Sorry I don't maintain this. I should make it into a proper repo so people can submit PRs?

A long time ago I created a repo for infinite scrolling. I update it infrequently.

Unfortunately, I don't use uBlock. I use umatrix. It is a good list to spot the targets though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment