AO3: Load All Comments

Automatically fetches and appends all pages of comments on AO3 — et carthago delenda est. Matches are AO3 and its TLDs that are not redirects directly to .org (no point in matching the TLDs that are simply redirects — cf. https://archiveofourown.org/faq/accessing-fanworks#archiveurl).

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey, Greasemonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да инсталирате разширение, като например Tampermonkey .

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Userscripts.

За да инсталирате скрипта, трябва да инсталирате разширение като Tampermonkey.

За да инсталирате този скрипт, трябва да имате инсталиран скриптов мениджър.

(Вече имам скриптов мениджър, искам да го инсталирам!)

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

(Вече имам инсталиран мениджър на стиловете, искам да го инсталирам!)

Автор
Charles Rockafellor
Инсталации дневно
0
Инсталации общо
3
Рейтинг
0 0 0
Версия
1.5 on 07 May 2026
Създаден
08.05.2026
Обновен
08.05.2026
Размер
6 КБ
Лиценз
MIT
Работи на

A friend asked if it would be possible to view all comment threads in one swell foop (joke, not typo).  I was sure that it could be done, but figured that a JS userscript probably could look ahead to n-many pages seeking each page of comments that has <li class="next" title="next"><a data-remote="true" rel="next" href="/comments/show_comments?page=5&work_id=28934610">Next →</a><li> and store those in a virtual memory (rather than rendering the actual HTML) until finding the final page that lacks that button, then append those pages' comments to the bottom of the first page.
  I'm OK at CSS, but am a toddler-with-building-blocks level in JS, and so (while I don't care to admit this, my conscience demands that I do) I had to resort to asking Google search's "AI Mode" for the actual coding needed: this is way beyond my current level of skill, but I didn't want to let my friend down either, so... there you have it.

NB:  This functions for single-chapter works' multiple pages of comments, and for the expansion of multiple truncated-continued-subthreads of a multi-chapter work's single chapter — but I need to find a multi-chapter work with a single chapter that has multiple pages of comments in order to test that.  It does not yet work for multi-chapter works in Entire Work view.

I tested in Tampermonkey in Chrome and Violentmonkey in Firefox, both in a WIN 11 environment.  Attached images show the four stages:


  1. Image 1 shows what to expect upon clicking the comments button: a big AO3-red div-looking button.

  2. Image 2 shows it having been clicked and now merging all pages' comment threads [not the truncated continuations, yet] while retaining the structure of separating initial comments from reply threads and all forks of multiple sub-threads.

  3. Image 3 shows it expanding the truncations (and merging those in, as well, of course).

  4. Image 4 shows the final result of everything having been loaded (and I can confirm that in my testing, the structure and expansions, and expansions' structure was maintained).