Skip to content

Commit

Permalink
update #9597, #9642, #9694
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuki2718 committed Sep 12, 2021
1 parent 39652bc commit 5450034
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 1 addition & 3 deletions filters/filters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ google.*##a[href*="/aclk?"][data-al]:upward(2)
www.google.*##div.ellip > span:has-text(/^Ads?$/):upward(2)

! https://github.com/uBlockOrigin/uAssets/issues/9597
www.google.*##[href^="/aclk"][href$="adurl="]:not(:scope > :upward([class^="sh-sr__shop-result-group"])):upward(3)
www.google.*##.sh-sr__shop-result-group .sh-sp__btn:matches-css(font-size: 13px):upward(.sh-sr__shop-result-group):has(a[href^="/aclk"][href$="adurl="])
www.google.*##[href^="https://www.googleadservices.com/pagead/aclk?"][href$="adurl="]:upward(3)
! `$shide` replacement
! www.google.*##:not(:matches-path(/^/search\?q=.*?tbm=shop|^/shopping/)) [href^="/aclk"][href$="adurl="]:not(> *:upward([class^="sh-sr__shop-result-group"])):upward(3)

! https://www.reddit.com/r/uBlockOrigin/comments/p94hv9/google_maps_booking_dot_com_ad/
www.google.*##a[href^="/aclk"][href*="placesheetAdFix="][href*="adurl="]:upward(1)
Expand Down
6 changes: 0 additions & 6 deletions filters/unbreak.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4177,12 +4177,6 @@ coolmathgames.com##+js(set, network_user_id, '')
||hb.afl.rakuten.co.jp^$badfilter
||hb.afl.rakuten.co.jp^$3p

! https://github.com/uBlockOrigin/uAssets/issues/9642
@@||www.google.*/search?q=*tbm=shop$shide

! https://github.com/uBlockOrigin/uAssets/issues/9694
@@||www.google.*/shopping/$shide

! https://www.reddit.com/r/uBlockOrigin/comments/oxcp5b/site_namesorg_broken/
@@||names.org^$cname

Expand Down

30 comments on commit 5450034

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous filter still hides whole page for JP locale:

google

I think with this matces-css version $shide is no more needed, but double-check is welcome.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the matches-path filter ?

@uBlock-user
Copy link
Contributor

@uBlock-user uBlock-user commented on 5450034 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ads are back at https://www.google.com/search?q=DOOM+Eternal


www.google.*##[href^="/aclk"][href$="adurl="]:not(:scope > :upward([class^="sh-sr__shop-result-group"])):upward(3) is needed.

@uBlock-user
Copy link
Contributor

@uBlock-user uBlock-user commented on 5450034 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yuki2718 It wouldn't in the presence of @@||www.google.*/search?q=*tbm=shop$shide


$shide needs to made less specific then.

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wouldn't in the presence of @@||www.google.*/search?q=*tbm=shop$shide

What do you mean?

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ads are back at https://www.google.com/search?q=DOOM+Eternal

I can't reproduce, what modification is needed?

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the matches-path filter ?

Assuming shide is no more needed, but I may be wrong.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added - @@||www.google.*/search*tbm=shop$shide

Add the original filter and add that filter, shouldn't cause the breakage you mentioned in 5450034#commitcomment-56321446

@Yuki2718
Copy link
Contributor Author

@Yuki2718 Yuki2718 commented on 5450034 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, shouldn't cause the breakage you mentioned in [5450034#commitcomment-56321446]

Actually causing with default setup, the path is slightly different. Okay you noticed that. And shide makes hiding ads impossible.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$shide is temp until :matches-path filter is activated

If nothing else I can make it specific to .com for now.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually causing with default setup, the path is slightly different.

I tested on the path transcribed from https://user-images.githubusercontent.com/58900598/132979597-3176c0ca-6138-48f6-9bf1-3b50f45bc1a4.png

and I don't see any breakage with the two filters I suggested to add.

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I mean no q= and you noticed that.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce your issue on https://www.google.co.jp/search?tbm=shop&hl=ja&psb=1&q=cars

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No wonder, just like I can't reproduce the missed ads.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yuki2718 Get a US VPN or a UK VPN and then browse to that url.

Capture

just like I can't reproduce the missed ads.

You misunderstand, I can reproduce your issue but not after modifying the $shide filter to cover .jp case which I did in 001aa6c

@Yuki2718
Copy link
Contributor Author

@Yuki2718 Yuki2718 commented on 5450034 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can ##[href^="/aclk"][href$="adurl="]:not(:scope > :upward([class^="sh-sr__shop-result-group"])):upward(3) be re-written like ##*:not([class^="sh-sr__shop-result-group"]) [href^="/aclk"][href$="adurl="]:upward(3)?

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You misunderstand,

I guess I understand:

Yeah, I mean no q= and you noticed that.

@Yuki2718
Copy link
Contributor Author

@Yuki2718 Yuki2718 commented on 5450034 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the only issue is that missed ads, how about adding another filter for that? On my end my fix and removing shide correctly hides Sponsored products on shopping and search pages without FP. Tested both on US and JP locale.

@uBlock-user
Copy link
Contributor

@uBlock-user uBlock-user commented on 5450034 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

##*:not([class^="sh-sr__shop-result-group"]) [href^="/aclk"][href$="adurl="]:upward(3)

Works fine, we can change to that. Does changing to that filter help with the JP locale case ?

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay now reproduced ads with US IP.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are not missed ads btw, Google started inserting products ads as of last month.

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are not missed ads btw, Google started inserting products ads as of last month.

But we will block them anyway, right?

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

##*:not([class^="sh-sr__shop-result-group"]) [href^="/aclk"][href$="adurl="]:upward(3) works fine for them if you want to remove original filter

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e6032f5

Now with this change, whether we still need $shide or not, I leave that upto to you.

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I want to remove $shide without waiting for the arreival of matches-path, if possible. They may change but until then matches-path will become available.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only worry is that by removing $shide we may start seeing shopping pages breakage again and dealing with them again and again is tedious, so my preferance was to wait for the arrival of the stable build for us to use :matches-path.

@Yuki2718
Copy link
Contributor Author

@Yuki2718 Yuki2718 commented on 5450034 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, given the history. I'll leave them for now. The matches-css filter will become usuful once shide is removed so I'll temp comment it out.

@uBlock-user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yuki2718 Also would you mind modifying the regex in www.google.*##:not(:matches-path(/^/search\?q=.*?tbm=shop|^/shopping/)) [href^="/aclk"][href$="adurl="]:not(> *:upward([class^="sh-sr__shop-result-group"])):upward(3) to cover the current breakage JP locale issue as well ?

@Yuki2718
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yuki2718
Copy link
Contributor Author

@Yuki2718 Yuki2718 commented on 5450034 Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisited, I think we can remove $shide by replacing current filters with www.google.*##*:not([class^="sh-sr__shop-result-group"]) #kp-wp-tab-overview g-dropdown-menu:upward(#kp-wp-tab-overview > div):has(a[href*="/aclk?"][href$="adurl="]). Let's see if this still breaks pages.

Please sign in to comment.