Gift modal appears in reader mode output for lemonde.fr articles
Open
Nobody has claimed this yet.
has-website-testcase
reader-mode-has-issues
top-website-issue
- Dominant language
- JavaScript
- Stars
- 11.5k
- Forks
- 732
- PR merge metrics
- No merged PRs in 30d
Description
Via https://bugzilla.mozilla.org/show_bug.cgi?id=1922931 .
HTML of the modal looks like this:
<div id="js-modal-gifted-url" class="article__gift-modal"> <div class="article__gift-modal__overlay"></div> <div class="article__gift-modal__content"> <div class="article__gift-modal__title"><span class="article__gift-modal__logo icon__gift"></span>Cet article vous est offert</div> <div class="article__gift-modal__text">Pour lire gratuitement cet article réservé aux abonnés, connectez-vous</div> <a class="lmd-btn lmd-btn--primary lmd-btn--l lmd-btn--fullwidth js_modal_login" href="https://secure.lemonde.fr/sfuser/connexion?gift=true">Se connecter</a> <div class="article__gift-modal__text article__gift-modal__text--no-margin lmd-typo--text-center"> Vous n'êtes pas inscrit sur Le Monde ? <br> <a class="article__gift-modal__link js_modal_login" href="https://secure.lemonde.fr/sfuser/register?gift=true">Inscrivez-vous gratuitement</a> </div> </div> </div>
The article__gift-modal class gets display: none in some CSS but that does not make it into readability's determinations of what to do.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Readability handles the supplied lemonde.fr HTML and whether the article__gift-modal element reaches the output despite its CSS display:none rule. Use the provided modal markup as the reproduction case; done means the gift modal is excluded from reader mode output without removing article content.
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