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

www.ebay.com #126089

Closed
adguard-bot opened this issue Aug 2, 2022 · 8 comments
Closed

www.ebay.com #126089

adguard-bot opened this issue Aug 2, 2022 · 8 comments
Labels
A: In progress Work on the issue is in progress A: Waiting for data Waiting for more information from the user N: AdGuard for Safari P1: Critical T: Ads

Comments

@adguard-bot
Copy link

Issue URL (Ads)

https://www.ebay.com/sch/i.html?_from=R40&_nkw=projector&_sacat=0&_sop=15&rt=nc&LH_BIN=1

Comment

Username: @jimmysofat6864

At the bottom of the page I get sponsored listings

Screenshots

Screenshot 1

Screenshot 1

System configuration

Information value
AdGuard product: AdGuard for Safari v1.11.6
Browser: Safari
Filters: Ad Blocking:
AdGuard Base,
AdGuard Mobile Ads

Privacy:
AdGuard Tracking Protection,
EasyPrivacy,
Fanboy's Enhanced Tracking List,
Peter Lowe's Blocklist

Annoyances:
AdGuard Annoyances,
Fanboy's Annoyances,
Web Annoyances Ultralist,
Adblock Warning Removal List,
I don't care about cookies,
EasyList Cookie List,
Dandelion Sprout's Annoyances List

Security:
Online Malicious URL Blocklist,
NoCoin Filter List
@BlazDT
Copy link
Contributor

BlazDT commented Aug 2, 2022

Ad ones have this style:
text-shadow:var(--srp-gray-base) 0px 0px

Sadly matches-css is not hiding, an idea @AdamWr ? Likely due to pseudo "first-line"

ebay.*#?#.s-item:has(> .s-item__wrapper > .s-item__info > .s-item__details > .s-item__detail > span > span[aria-labelledby^="s-"] > span:matches-css(text-shadow: var(--srp-gray-base) 0px 0px))

@BlazDT BlazDT added the A: In progress Work on the issue is in progress label Aug 2, 2022
@AdamWr
Copy link
Member

AdamWr commented Aug 3, 2022

Likely due to pseudo "first-line"

You are probably right.
As far as I understand, matched span without ::first-line doesn't have text-shadow (it has text-shadow: none), so that's why it doesn't work. And it seems that ::first-line is not supported by Extended CSS rules.


Probably something like this:

ebay.com#%#AG_onLoad(function(){const b=new MutationObserver(function(){const a=document.querySelectorAll(`.s-item:not([style]) .s-item__wrapper > .s-item__info > .s-item__details > .s-item__detail > span > span[aria-labelledby^="s-"] > span`);a.forEach(a=>{if("rgb(112, 112, 112) 0px 0px 0px"===window.getComputedStyle(a,":first-line").textShadow){const b=a.closest(".s-item:not([style])");b&&(b.style="display: none !important;")}})});b.observe(document,{childList:!0,subtree:!0})});

should works.

Code:
AG_onLoad(function () {
  const a = new MutationObserver(function () {
    const elements = document.querySelectorAll(`.s-item:not([style]) .s-item__wrapper > .s-item__info > .s-item__details > .s-item__detail > span > span[aria-labelledby^="s-"] > span`);
    elements.forEach(e => {
      if (window.getComputedStyle(e, ':first-line').textShadow === "rgb(112, 112, 112) 0px 0px 0px") {
        const parent = e.closest(".s-item:not([style])");
        if(parent) {
        parent.style = "display: none !important;";
        }
      }
    });
  });
  a.observe(document, {
    childList: !0,
    subtree: !0
  });
});

@krystian3w
Copy link
Contributor

@gwarser, @gorhill, @uBlock-user this looks like troubles with: uBlockOrigin/uBlock-issues#2090

more pages can start use this instead ::after and ::before, maybe needed follow method fix in AG or write own :matches-css-first-letter / :matches-css-first-line.

@slavaleleka
Copy link
Contributor

we really need a new pseudo-class for such cases

@slavaleleka
Copy link
Contributor

@krystian3w can you please show some real examples of :first-letter usage?

@krystian3w
Copy link
Contributor

For now no, so no possible implement in uBo - no like PoC.

@Alex-302 Alex-302 added the A: Waiting for data Waiting for more information from the user label Aug 25, 2022
@Alex-302 Alex-302 closed this as completed Sep 7, 2022
@uBlock-user
Copy link

gorhill added support - gorhill/uBlock@7bc0b5d

@krystian3w
Copy link
Contributor

Not in stable, still for dev builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: In progress Work on the issue is in progress A: Waiting for data Waiting for more information from the user N: AdGuard for Safari P1: Critical T: Ads
Projects
None yet
Development

No branches or pull requests

7 participants