Add AO3 Mark for Later Button to works list

Puts the "Marked for Later" button in a fic blurb when browsing AO3.

Author
JaneBuzJane
Daily installs
0
Total installs
331
Ratings
2 1 0
Version
0.1
Created
2021-09-13
Updated
2021-09-13
License
N/A
Applies to

Description

This script adds a button to each work on archiveofourown.org (AO3) when browsing tags that allows a user to add a work to their "Marked for Later" list without having to open the fic in a separate tab.

When clicked, the page will refresh and the confirmation at the top of the page will match that that appears when you Mark a work for Later from within the work itself. (I didn't change anything with the existing backend handling.)

It themes with all AO3 site skins. It also works nicely with my other script, Put Marked for Later Button on AO3 Home.

Caveats

  1. The page will refresh when you click "Mark for Later."

  2. While the button within a work says "Mark as Read" when you've already added a work to your Marked for Later list, that functionality does not exist here. All works will say "Mark for Later" regardless of whether they are already on your Marked for Later list or not.

  3. Normally, the "Mark for Later" button does not appear on fics on which you are an author. I did not make such a distinction here, so you'll see the button appear on fics you've written if you're browsing the tag. (See image 3 below.)

Credits

Many thanks to my good friend Bat, who doesn't have social media where I can credit him, but is always around to help me when I need it, and today taught me about arrays. <3 I owe you a lot, man.