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, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
作者
Charles Rockafellor
1日のインストール数
1
累計インストール数
3
評価
0 0 0
バージョン
1.5 on 07 May 2026
作成日
2026/05/08
更新日
2026/05/08
大きさ
5.64KB
ライセンス
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).