AO3: Sticky Comment Box

gives you a comment box that stays in view as you scroll and read the story

These are versions of this script where the code was updated. Show all versions.

  • v2.3 18/03/2024

    added ability to toggle the name and email fields' display to save space

  • v2.2 17/03/2024

    fix: make the character counter display the correct number when the dialog is first opened (considering cached text)
    new: added listener for a potential comment formatting button bar to also update the character counter

  • v2.1 16/03/2024

    now you can also comment as a Guest if you're not logged in :)
    it does some rough email address checking - if your email doesn't work and it keeps showing you an error, let me know; I'll fix the check

  • v2.0 15/03/2024

    chapter selection support

    • creates a list of chapters + the entire work as options for posting the comment to
    • CACHES ONLY ONE COMMENT TEXT FOR THE ENTIRE WORK i.e. it doesn't save individual texts for each chapter. What you put in while viewing chapter 1 will automatically carry over when you're viewing chapter 2
    • if there's no pseud and no chapter to select, that whole line is hidden to save space
    • in chapter-by-chapter mode, the currently viewed chapter is automatically selected as the target for posting your comment
    • in entire-work mode, the Entire Work option is selected as target.
    • in entire-work mode, when scrolling, the selection options always tell you which chapters are currently in view (text is "Chapter X (viewing)")
    • if posting to a particular chapter while in entire-work mode, the page won't refresh so you don't lose your spot. otherwise the page refreshes so you can see the comment you just posted.

    with this version the cache storage logic changed a bit and is not backwards compatible!

  • v1.3 13/03/2024

    now it'll work also when it's a multi-chaptered fic in chapter-by-chapter view, as well as when viewing a work from within a collection

  • v1.2 10/03/2024

    found paths (e.g. new work > preview > edit) where you end up on /works/#### although it shows the Edit form. so I can't rely on finding exclude paths. the ones we have stay, lighten the load on the browser. but if there's no actual work content displayed, it'll terminate immediately.

  • v1.1 10/03/2024

    @exclude added for /work/search

  • v1.0 09/03/2024

    Release Candidate 1: I consider this the first stable version that would be ready for public consumption, but it needs additional testing. Especially around the paths that are used for caching comment text and the @excludes (I suspect I'm missing at least one).
    added since 0.13 were a couple more fixes
    * page scroll now stays where it is no matter how you close the dialog
    * keyboard shortcuts aren't shown on screens < 500px to save space
    * if the dialog opens outside of viewport (you made your browser smaller) it defaults back to bottom right
    * actually deletes any outdated cache, not just for the viewed page

  • v0.13 09/03/2024

    added settings: choice of or

    for quotes, and a keyboard shortcut to toggle the dialog
    added a fixed toggle button at the bottom-right of the screen instead of the one at the top

  • v0.12 09/03/2024

    workaround for dialog close intentionally scrolling back to top

  • v0.11 09/03/2024

    contain dialog to viewport so it can't disappear when screen starts to scroll

  • v0.10 09/03/2024

    added pseud selection, some CSS to decrease dialog size

  • v0.9 08/03/2024

    bugfix

  • v0.8 08/03/2024

    more switches for mobile

  • v0.7 08/03/2024

    switching themes to make icons brighter; min size for buttons

  • v0.6 08/03/2024

    switching to icon only for buttons on mobile

  • v0.5 08/03/2024

    next fontsize attempt

  • v0.4 08/03/2024

    attempt to make the dialog text smaller, since it's so overwhelmingly big on mobile

  • v0.3 08/03/2024

    theme light/dark auto detection

  • v0.2 08/03/2024

    added jQuery UI theme

  • v0.1 08/03/2024