Substack: auto-expand "Read more"
Automatically clicks "Read more" and "Show more" toggles so the whole post is visible at once.
Code to copy
// Auto-click "Read more" / "Show more" toggles inside the post body
(function () {
function expand() {
document.querySelectorAll('button, a[role="button"]').forEach(function (b) {
if (b.dataset.jzSubExpanded) { return; }
var t = (b.textContent || '').trim().toLowerCase();
if (t === 'read more' || t === 'show more' || t === 'continue reading'
|| t.startsWith('read more') || t.startsWith('show more')) {
b.dataset.jzSubExpanded = '1';
try { b.click(); } catch (e) {}
}
});
}
expand();
var obs = new MutationObserver(function () {
clearTimeout(window.__jzSubExpand);
window.__jzSubExpand = setTimeout(expand, 500);
});
obs.observe(document.body, { childList: true, subtree: true });
})();
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.