mozilla / mozilla/readability

Reader mode on Royal Road stories shows CSS-hidden messages

Open
#984 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

has-website-testcase reader-mode-has-issues
Dominant language
JavaScript
Stars
11.5k
Forks
732
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Royal Road chapter in reader mode and inspect how its same-page style element and CSS-hidden messages are handled. Done means those messages no longer appear in reader mode while the visible chapter content remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.