This snippet hides the Load more button and automatically loads the next batch of database items as visitors scroll toward the bottom. One shared JavaScript snippet handles table, gallery, and feed views, including multiple databases on the same page, without collection-specific selectors.
Supported layouts: Table, gallery, and feed views with Super's native Load more button.
Installation instructions
- Open your site in the Super Dashboard.
- Open Code → Body.
- Replace any earlier version of this snippet with the complete code below, including the opening and closing script tags, and save your changes. Install it only once.
- Fully reload your site, then scroll toward the end of a table, gallery, or feed database to check that more items appear automatically.
Customization
Change preloadDistance = 400 to adjust how far ahead loading begins, in pixels. A larger value starts loading earlier.
Notes
- The snippet uses plain JavaScript and requires no external libraries.
- It detects database Load more buttons added after the initial page load, including during navigation without a full reload.
- Do not hide the button with
display: none. The script usesvisibility: hiddento keep its position measurable. - The next automatic click waits for the surrounding items to change. Disabled or busy buttons are not clicked. If no progress is detected within 15 seconds, the button becomes visible again for manual loading; reload the page to resume automatic loading.
- To remove this behavior, delete the snippet from Code → Body and reload your site.
This is an experimental snippet. Check it on your site before relying on it in production.