AO3: Get Current Chapter Word Count

Counts and displays the number of words in the current chapter

< Feedback on AO3: Get Current Chapter Word Count

Review: Good - script works

§
Posted: 05-06-2024

Useful little script, thank you for making it!

One small issue I noticed is that if you navigate to a chapter via a subscription email, the script doesn't work for some reason. I know you're matching it with
// @match *://archiveofourown.org/*chapters/*
But the word count does not show up on this example: https://archiveofourown.org/chapters/143376985

w4tchdogeTác giả
§
Posted: 05-06-2024
Edited: 05-06-2024

Useful little script, thank you for making it!

One small issue I noticed is that if you navigate to a chapter via a subscription email, the script doesn't work for some reason. I know you're matching it with
// @match *://archiveofourown.org/*chapters/* But the word count does not show up on this example: https://archiveofourown.org/chapters/143376985

Thanks for the issue report!

I uhhh, I'm not matching on *://archiveofourown.org/*chapters/* actually. I'm matching on *://archiveofourown.org/*works/*. I didn't even know you could read a chapter from a URL like that.

I'll add a *://archiveofourown.org/*chapters/* match rule to the script soon, currently putting the finishing touches on some bugfixes and additions to my implementation of AO3's word counting regular expression, and the *://archiveofourown.org/*chapters/* match rule will be in that update.

§
Posted: 05-06-2024
Edited: 05-06-2024

I uhhh, I'm not matching on *://archiveofourown.org/*chapters/* actually. I'm matching on *://archiveofourown.org/*works/*. I didn't even know you could read a chapter from a URL like that.

Oh, I must've added that in an attempt to fix the problem then, hah. It's not enough though, it doesn't work even with that line. It's not a big issue though, you can just click on the chapter display at the top to get to the /works/ equivalent of the chapter. I don't understand why Ao3 even differentiates there.

w4tchdogeTác giả
§
Posted: 05-06-2024
Edited: 05-06-2024

It's not enough though, it doesn't work even with that line.

That's because v1.1.3 checks if the current page URL contains "works" (curr_page_url.pathname.includes('works') in the if condition). I'm doing away with that in v1.2.0 since @match *://archiveofourown.org/*works/* already does that job.

I'm hoping to get v1.2.0 out in the next ~6 hours but I'm currently a bit preoccupied watching some sportsball 😅

w4tchdogeTác giả
§
Posted: 05-06-2024

v1.2.0 is now live and it should fix the issue you were having. Let me know if it hasn't or something else's cropped up or the word count seems inaccurate

§
Posted: 05-06-2024

Works perfectly, thanks for the quick fix!

Post reply

Đăng nhập để bình luận