Ivan
@notegone
I have released a userscript called Expand Everything (https://github.com/ludios/expand-everything) which clicks on all the "show more" links on a page, so that you have a lot more of the page text available for searching, copying, or archiving. It supports these sites right now: https://i.imgur.com/6CwCCvu.jpg
1 reply
0 recast
0 reaction
Ivan
@notegone
This is implemented using MutationObserver and querySelectorAll to watch for certain elements that should be clicked on, but crucially: 1) the MutationObserver is disconnected after e.g. 100 mutations to avoid slowing things down, and
1 reply
0 recast
0 reaction
Ivan
@notegone
2) the MutationObserver is reinstalled after an SPA navigation (because there might be new elements to click on). This currently relies on the 'navigate' event which is still Chromium-only (https://caniuse.com/mdn-api_navigation), but I am open to contributions to make this work elsewhere.
0 reply
0 recast
0 reaction