Skip to content

Conversation

@proletarius101
Copy link
Contributor

@proletarius101 proletarius101 commented Dec 3, 2020

See discussion in https://www.v2ex.com/t/730727

URL(s) where the issue occurs

[https://www.zhihu.com/question/408769119]

Describe the issue

Recently, zhihu.com adds a mandentory login popup for every page. So nobody can read any user-generated-content on that site anonymously.

Screenshot(s)

image

Versions

  • Browser/version: Firefox/83.0
  • uBlock Origin version: 1.31.0

@lijunkang12
Copy link

Hi, this cosmetic filter will also block the comment pop-up when clicking on "查看回复".

@uBlock-user
Copy link
Member

@lijunkang12 How about ##.Modal-enter-done then ?

@lijunkang12
Copy link

@uBlock-user The problem is that the comment pop-up and the login pop-up have the same class Modal-wrapper undefined Modal-enter-done.

@uBlock-user
Copy link
Member

uBlock-user commented Dec 5, 2020

Seems to be working, did you try the filter above ? When I click on the pencil symbol button the popup appears.

Be sure to add zhihu.com#@#.Modal-wrapper when testing.

@mapx-
Copy link
Contributor

mapx- commented Dec 5, 2020

@uBlock-user imo those filters should be moved to annoyances list

@uBlock-user
Copy link
Member

because they added X button now ?

@lijunkang12
Copy link

@uBlock-user No, with ##.Modal-enter-done, the comment pop-up is also blocked. As I have explained, the problem is that the login pop-up that we would like to block has the same dom class as the comment pop-up. I am looking for a workaround.

@uBlock-user
Copy link
Member

@lijunkang12 We can remove it altogether if the regional list maintainers would like to fix this themselves.

@lijunkang12
Copy link

lijunkang12 commented Dec 5, 2020

Yeah, I totally agree that this should rather be included in the regional list!

@uBlock-user
Copy link
Member

uBlock-user commented Dec 5, 2020

282b98c

@cjx82630

@proletarius101 proletarius101 deleted the patch-1 branch December 6, 2020 06:13
@proletarius101
Copy link
Contributor Author

proletarius101 commented Dec 6, 2020

@lijunkang12

Since it's been removed, is it in the regional list already? I don't think they'll add it into the regional list because it's not an "ad" but an annoying popup.

@uBlockOrigin uBlockOrigin deleted a comment from proletarius101 Dec 6, 2020
@lijunkang12
Copy link

lijunkang12 commented Dec 6, 2020

@proletarius101 I am afraid no.

By the way, I have found out that a cosmetic filter cannot work properly against such pop-up.

First, one needs #?#div.Modal-wrapper:-abp-has(>div.signFlowModal) rather than ##.Modal-wrapper as cosmetic filter. This one blocks only the login pop-up but not comment pop-ups.

However, if you try this one, you will find out that the rest of the page is gone even when the login pop-up is properly blocked, which means you can only view the content in the beginning of a thread. This is because zhihu.com loads a javascript that changes the webpage when the user has not logged in. So the only solution to avoid this mandatory login is to block this specific js file using the rule:
||static.zhihu.com/heifetz/main.signflow.f8d09c909f9b8108d429.js$script,domain=www.zhihu.com

It turns out to work fine. I do not know any side effect for the moment. On the other hand, as you said, this is not an ad but rather an annoyance, the regional list might not accept it. Maybe you could communicate with them on this subject?

@uBlock-user
Copy link
Member

||static.zhihu.com/heifetz/main.signflow.f8d09c909f9b8108d429.js$script,domain=www.zhihu.com

Sure we can add that if you can confirm there's no breakage after adding that.

@lijunkang12
Copy link

Yes, I can confirm there is no breakage.

@proletarius101
Copy link
Contributor Author

proletarius101 commented Dec 6, 2020

It should really be ||static.zhihu.com/heifetz/main.signflow.*.js$script,domain=www.zhihu.com as I proposed in the first place. They use generator like React so using a specific hash will not work for a long time. And I can confirm no breakage as well.

@lijunkang12
Copy link

Yes you are completely right. Sorry I didn't notice your proposition in the beginning! Let us use ||static.zhihu.com/heifetz/main.signflow.*.js$script,domain=www.zhihu.com then.

uBlock-user added a commit that referenced this pull request Dec 6, 2020
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

Successfully merging this pull request may close these issues.

4 participants