Skip to content
项目

ludios/expand-everything

在 GitHub 查看

关于

(Now LLM-authored) Userscript to click "show more" links to expand all the text on a page, without slowing things down too much

人工智能与机器学习

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Expand Everything

Load more!, show more!, read more! - these are the cursed buttons that website owners make you click before you can see all the information that you came to read. Reviews and comments deemed "too long"; YouTube video descriptions that are hidden. Expand Everything fixes this by clicking them for you.

This is ideally suited for use cases where you plan to read, print, copy, or archive (e.g. SingleFile) the entire page.

Demo.

Efforts are made to avoid slowing things down after the initial load. We use MutationObserver and querySelectorAll to watch for the elements that we need to automatically click, but crucially:

  1. The MutationObserver is disconnected after e.g. 200 mutations to avoid slowing things down. The "stop the observer" count is different for each website and you can try adjusting them to your liking.

  2. The MutationObserver is reinstalled after an SPA navigation (because there might be new elements to click on).

    When available, we use Navigation API to watch for location changes; otherwise, we use setInterval(..., 1000), but stop polling when the page is not visible.

Install

This is distributed as a userscript, so you need a browser extension that runs userscripts.

Violentmonkey can be installed in Firefox and Chromium-based browsers. Userscripts works in Safari.

Then, visit expand.user.js and Confirm installation.

(Alternatively, create a new script and paste in the entire expand.user.js source.)

Supported sites

For test pages, see the "Test page:" comments in expand.user.js. The end-to-end tests in e2e/ load some of these pages in Chrome with the userscript and check that it still expands them.

Demo

The video description and comment replies are expanded automatically.

探索相关项目

加载中…