SpaceBattles Reader Mode

Some minor tweaks to help enable and preserve reader mode on SpaceBattles and SufficientVelocity.

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

  • v1.14 03.04.2026
    • Some tweaks to work with SufficientVelocity as well
    • Minor improvements to UBupdateLocationAnchor function so page title updates more reliably
  • v1.13 04.09.2025

    fix issue preventing mini-ToC if no Reader Mode button on post

  • v1.12 01.09.2025

    change "chapter" to "threadmark" in link title attributes

  • v1.11 01.09.2025
    • Add title attributes to links for hover text and screen readers
    • Replace scroll-to-top link in mini-ToC with watch / unwatch button
  • v1.10 01.09.2025

    make mini-ToC hidden by default again

  • v1.10 01.09.2025

    disable console.log I stupidly left in

  • v1.10 01.09.2025

    added scroll icons with reader-mode links to mini-ToC if not in reader mode, tweaked mini-ToC builder code and CSS accordingly

  • v1.9 30.08.2025

    add link to top of page in mini-ToC

  • v1.8 30.08.2025

    fix error building mini-ToC if no pagination

  • v1.7 29.08.2025

    add RSS link to top of mini-ToC

  • v1.6 29.08.2025

    add highlight to current chapter in mini-ToC

  • v1.5 28.08.2025

    finalise mini-ToC functionality

  • v1.4 28.08.2025

    simplify menu command handling

  • v1.4 28.08.2025

    fix menu command handling on mobile

  • v1.4 28.08.2025

    use GM functions to let use toggle the Threadmark mini-ToC

  • v1.3 28.08.2025
  • v1.3 28.08.2025

    add bulk of code ready for floating mini-table-of-contents

  • v1.2 19.08.2025

    tweak code layout, add chapter title to HTML title in the scroll event listener

  • v1.1 17.08.2025

    Added a scroll listener to add chapter post IDs to the URL hash, to help users keep their place.

  • v1.0 17.08.2025