AO3 Word Count Script

Adds word counts to chapter links on AO3 Chapter Index pages and in Stats on each chapter page.

Autor
AntonDumov
Denne inštalácií
0
Celkový počet inštalácií
120
Hodnotenie
0 0 0
Verzia
4.1
Vytvorené
18.03.2023
Aktualizované
29.03.2023
Veľkosť
5,1 KB
Licencia
MIT
Spustiť na

The script adds word counts to chapter links on AO3 Chapter Index pages and in Stats on every chapter page. The script uses regular expressions and DOM manipulation to extract the word count from the HTML content of each chapter and adds it as a span element to the chapter link.

The script also implements caching of word counts to reduce the number of HTTP requests made to AO3. Cached word counts are stored in the user's local storage and are retrieved and used if they are not expired. The cache duration is set to 30 days.