Counts and displays the number of words in the current chapter
These are versions of this script where the code was updated. Show all versions.
AO3 WordCount v1.2.1
Prevent script from running on multi-chapter works which only have 1 chapter published.
AO3 WordCount v1.2.0
Replace \w with [\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}] in the regular expession as that is the proper JavaScript equivalent to Ruby's [[:word:]]. Add support for most Unicode scripts supported in regular expressions. Use Array.from() instead of the spread syntax to convert the RegExpStringIterator into a countable array. Add ://archiveofourown.org/*chapters/ as a @match rule so that the script can work on URLs such as https://archiveofourown.org/chapters/141182779. Add ://archiveofourown.org/*works//navigate as an @exclude rule so the script does not run on the index page.
AO3 WordCount v1.1.3
Get rid of the element containing the words "Chapter Text" using removeChild() so I don't have to use RegEx to get rid of it. Also some miscellaneous cleanup
AO3 WordCount v1.1.2
Switch to using Intl.NumberFormat for making the word count thousands separated
AO3 WordCount v1.1.1
Modify the match rule so that it matches collections//works URLs as well; Add an exlude role so it doesn't work on works//bookmarks pages as it isn't designed to
AO3 WordCount v1.1.0
Implement a counting method that uses an attempted conversion of the Ruby regex code used by AO3 to JavaScript
remove unused parameter from Word_Counter
add icon to script before i forget AGAIN
update script description
remove unnecessary Boolean()