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

tumblr.com #14606

Closed
6 tasks done
wavygecko opened this issue Aug 31, 2022 · 24 comments
Closed
6 tasks done

tumblr.com #14606

wavygecko opened this issue Aug 31, 2022 · 24 comments

Comments

@wavygecko
Copy link
Contributor

wavygecko commented Aug 31, 2022

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension
  • uBO with default lists/settings
  • using a new, unmodified browser profile

URL(s) where the issue occurs

https://www.tumblr.com/explore/trending

Describe the issue

There is a sign-in gate popup that appears when clicking usernames/tags.

Can be blocked with tumblr.com##+js(aeld, click, loginWallType)

However this appears to not work in Firefox (see DandelionSprout/adfilt#642 (reply in thread))


There is still a sign-in gate popup that appears when you scroll down the page a lot. I'm not sure how to block this one. Any ideas are welcome!

Screenshot(s)

image

uBlock Origin version

1.44

Browser name and version

chromium 107
ff 104

Notes

DandelionSprout/adfilt#642
#14605

@mapx-
Copy link
Contributor

mapx- commented Aug 31, 2022

test

tumblr.com##body:style(overflow: auto !important;)
tumblr.com###glass-container:has-text(clearance)

@wavygecko
Copy link
Contributor Author

Actually it looks like we only need the following filters to make it all work!

||assets.tumblr.com/pop/js/modern/async-login-wall-*.js$script,1p
tumblr.com##+js(aeld, click, loginWallType)

@MasterKia
Copy link
Member

MasterKia commented Aug 31, 2022

@wavygecko If the second filter doesn't work in Firefox then maybe @mapx-'s suggested filters can help instead.

@wavygecko
Copy link
Contributor Author

@mapx-'s filters only are for blocking the overlay, which ||assets.tumblr.com/pop/js/modern/async-login-wall-*.js$script,1p does (and also fixes clicks after scrolling down the page which were not working before)

unfortunately I don't think there is a way to make it work in firefox (per #14204 (comment))

@mapx-
Copy link
Contributor

mapx- commented Aug 31, 2022

However no filter can be added because the login will be broken otherwise, just use whatever filters you want as custom ones

@mapx- mapx- closed this as completed Aug 31, 2022
@wavygecko
Copy link
Contributor Author

oof, you're right. so sad.

@Yuki2718
Copy link
Contributor

Yuki2718 commented Aug 31, 2022

The sentence of auto-appearing modal is different from the one appears you explicitly clicked login. Maybe

tumblr.com###glass-container:has-text(You need clearance for that)
tumblr.com##body:style(overflow: auto !important;)

(works only for English locale ofc)

@MasterKia
Copy link
Member

(works only for English locale ofc)

Maybe
tumblr.com###glass-container:has-text(51)
depends if they keep the area 51 joke in other locales.

@Yuki2718
Copy link
Contributor

Not working in JP locale

Yuki2718 added a commit that referenced this issue Aug 31, 2022
Yuki2718 added a commit to Yuki2718/adblock that referenced this issue Aug 31, 2022
Yuki2718 added a commit to AdguardTeam/AdguardFilters that referenced this issue Aug 31, 2022
@wavygecko
Copy link
Contributor Author

I don't think those filters will work 100%.

assets.tumblr.com/pop/js/modern/async-login-wall-*.js needs to be blocked.
If it is not blocked then after you scroll down the page for a bit (when the popup gate would appear), clicking images stops working.

Blocking that script, however, blocks the popup when you click on the signup/login buttons.

But! If we can create a filter that defuses the click event for the signup/login buttons that opens up the popup, then they should take the browser directly to a login/register page. (https://www.tumblr.com/login and https://www.tumblr.com/register)

@wavygecko
Copy link
Contributor Author

wavygecko commented Aug 31, 2022

Here's an overzealous approach that ostensibly works:

||assets.tumblr.com/pop/js/modern/async-login-wall-*.js$script,1p
tumblr.com##+js(aeld, click)

We need a more targeted approach though rather than blocking all click events so that images/etc. keep their click events.

e.g.:

||assets.tumblr.com/pop/js/modern/async-login-wall-*.js$script,1p
tumblr.com##+js(aeld, click, loginWallType)
! *some rule that defuses the click event for the login/signup buttons*

@Yuki2718
Copy link
Contributor

As already said, scriptlet doesn't work thx to csp.

@piquark6046
Copy link
Member

tumblr.com#?##glass-container:contains(/You need clearance for that|おっと、この先に進むには認証が必要/) does not work in KR locale.
Please change the regex to /You need clearance for that|おっと、この先に進むには認証が必要|앗, 허가를 받아야 합니다/.

@wavygecko
Copy link
Contributor Author

wavygecko commented Aug 31, 2022

As already said, scriptlet doesn't work thx to csp.

True, but it does work for Chromium.

But blocking the popup without scriplets breaks the site.

@Yuki2718
Copy link
Contributor

@ryanbr @Khrin ||tumblr.com/services/bblog

@MasterKia
Copy link
Member

scriptlet doesn't work thx to csp.

There's hope for that issue: #14605 (reply in thread)

@wavygecko
Copy link
Contributor Author

wavygecko commented Aug 31, 2022

I actually found multiple problematic things with the cosmetic blocking approach :(

issue 1

  1. Click login button to open popup
  2. Click outside popup to close it
  3. Scroll down the page a bunch
  4. The login popup reappears
tm.mov

issue 2

  1. Click on post image
  2. Nothing happens

@piquark6046
Copy link
Member

It seems that EventTarget.prototype.addEventListener is modified by tumblr.
Please try EventTarget.prototype.addEventListener.toString() in a browser console.

@wavygecko
Copy link
Contributor Author

There's a click event on #root that, if removed, allows the log-in and sign-up buttons to work even when the popup is blocked.

t.mov

But I can't figure out how to remove that click event with uBO. Any ideas?

@Yuki2718
Copy link
Contributor

Yuki2718 commented Sep 1, 2022

Please change the regex to
I actually found multiple problematic things with the cosmetic blocking approach :(

Actually I was aware of the issue 1 and it's acceptable, but the issue 2 is problematic and violates at least AG's criteria. I'll disable the rules.

Yuki2718 added a commit that referenced this issue Sep 1, 2022
Yuki2718 added a commit to AdguardTeam/AdguardFilters that referenced this issue Sep 1, 2022
@MasterKia
Copy link
Member

@Yuki2718 Did you test with :remove() or :style(filter: opacity(0) !important;)?

@Yuki2718
Copy link
Contributor

Yuki2718 commented Sep 1, 2022

No.

@MasterKia
Copy link
Member

@wavygecko
Copy link
Contributor Author

Did you test with :remove() or :style(filter: opacity(0) !important;)?

Seems like we still run into the same problems using those.

I think we can only move forward with this if

  1. the CSP issue is fixed in uBO for Firefox (Is it possible to defuse tumblr.com click events? #14605 (reply in thread))
  2. we figure out a solution for the login/signup buttons (tumblr.com #14606 (comment))

@MasterKia MasterKia mentioned this issue Mar 10, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants