Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foreignpolicy.com paywall #7170

Closed
HermannBjorgvin opened this issue Mar 30, 2020 · 1 comment
Closed

foreignpolicy.com paywall #7170

HermannBjorgvin opened this issue Mar 30, 2020 · 1 comment
Labels

Comments

@HermannBjorgvin
Copy link

URL(s) where the issue occurs

https://foreignpolicy.com/2020/03/25/blame-china-and-xi-jinping-for-coronavirus-pandemic/

Describe the issue

Modal popup with a paywall

I'm creating a pull request now for this issue.

Versions

  • Browser/version: Firefox 74.0-2
  • uBlock Origin version: 1.25.2

Settings

foreignpolicy.com##div.tp-modal
foreignpolicy.com##div.tp-backdrop
foreignpolicy.com##.tp-active.tp-backdrop
foreignpolicy.com##html>body.tp-modal-open:style(overflow: auto !important; height: auto; -webkit-overflow-scrolling: auto;)

Notes

After hitting a paywall I created the following rules to start with:

foreignpolicy.com##div.tp-modal
foreignpolicy.com##.tp-active.tp-backdrop

Then started with adding breakpoints to since I noticed it is replacing classes for the paywall to appear. the class tp-modal-open on the tag was blocking scrolling on the page so I created a filter which has more specific selector which overwrites those blocking values to auto.

tp-modal-resizing is a class that gets added to the tag but it doesn't affect the page visual so I didn't create a rule for it.

At this point the paywall was removed but there was still a quick flash of black on the page when it popped up and before it was removed after a bit of investigating and adding breakpoints to the page to catch DOM attribute modifications I noticed div.tp-backdrop.tp-active was modifying it's class attribute and removing the tp-active class, this breaks the rules I added to block the paywall. It's a simple fix, create two rules, one with and one without the tp-active class.

@uBlock-user
Copy link
Contributor

Circumventing a paywall is considered out of scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants