Skip to content

Reader mode on Royal Road stories shows CSS-hidden messages #984

Open

Description

@jaredhirsch

Originally filed at: https://bugzilla.mozilla.org/show_bug.cgi?id=1987827

Steps to reproduce:

  • Open any story chapter on Royal Road; for instance, https://www.royalroad.com/fiction/118891/new-life-as-a-max-level-archmage/chapter/2324263/1-vivisari
  • Turn on reader mode
  • Somewhere in the page, buried in the chapter, you'll see a message like "If you come across this story on Amazon, it's taken without permission from the author. Report it." or "Help support creative writers by finding and reading their stories on the original site." or similar. There are various rotating messages. In that example URL, it appears right after the text "No response".

Royal Road embeds these messages in stories to fool simplistic scrapers. They all have CSS classes (with randomly generated class names) that are styled with a style element like this:

        <style>
            .cjNkODUzODExNzk4OTRiODhiMTU2ZDY0MDcwNWJiMWU5{
                display: none;
                speak: never;
            }
        </style>

It'd be helpful if Firefox's reader mode hid these. This doesn't require loading a separate CSS file; the styling is on the same HTML page.

Activity

  1. gijsk commented on Sep 24, 2025

    @gijsk
    Contributor

    This isn't really fixable in readability the way it is currently designed.

    This doesn't require loading a separate CSS file; the styling is on the same HTML page.

    This seems to be based on a misunderstanding of the constraints of readability - the problem isn't so much the external resource fetching (although tbf that doesn't help), but also the fact that we don't have a CSS parser and a layout engine, so determining which styles apply isn't possible (would require a full CSSOM etc.). Even in jsdom the "cascade" part of CSS is not fully implemented, cf. jsdom/jsdom#2690 - never mind the humble JSDOMParser that gets used in Firefox.

    So unless we change the fundamental approach of readability (and rely on a layout engine and getComputedStyle etc. working correctly), I don't think this is fixable at the moment.

  2. deleted a comment from on Apr 30, 2026
  3. deleted a comment from on Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions