Versuche zu verstehen, wie unendliches Scrollen in Discourse funktioniert

I’ve gathered so far that if Javascript is turned off, then pagination is turned on by something in the server-side code. I intend to identify what code produces that and investigate how to selectively activate it.