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

instagram.com: ads #14370

Closed
8 tasks done
sexymoomin opened this issue Aug 12, 2022 · 36 comments
Closed
8 tasks done

instagram.com: ads #14370

sexymoomin opened this issue Aug 12, 2022 · 36 comments

Comments

@sexymoomin
Copy link

Prerequisites

  • I read and understood the policy as to what is a valid filter issue
  • I verified that the issue has not already been reported (use this button to find out)
  • I forced an update of my filter lists (how to do this: click "Purge all caches", then click "Update now")
  • I did not remove any of the default filter lists, or I verified that the issue is not caused by removing any of the default lists
  • I did not enable external filter lists, or I verified that the issue still occurs without enabling external filter lists
  • I do not have custom filters/rules, or I verified that the issue still occurs without custom filters/rules
  • I am not using another content blocker along uBO (also mind browser built-in blockers)
  • I did not answer truthfully to all the above checkpoints

URL address of the web page

https://www.instagram.com/

Category

ads

Describe the issue

Saw ads

Screenshot(s)

Screenshot(s)

Configuration

uBlock Origin: 1.43.0
Firefox Mobile: 103
filterset (summary): 
  network: 81393
  cosmetic: 26932
  scriptlet: 17627
  html: 725
listset (total-discarded, last updated): 
  default: 
    user-filters: 0-0, never
    ublock-filters: 33200-310, 20h.30m
    ublock-badware: 4179-0, 18h.39m
    ublock-privacy: 247-1, 4d.21h.28m
    ublock-abuse: 76-0, 4d.21h.27m
    ublock-unbreak: 1872-0, 4h.15m
    ublock-quick-fixes: 360-1, 1d.2h.51m
    adguard-mobile: 8085-168, 20h.40m
    easylist: 69309-25114, 3d.1h.16m
    easyprivacy: 27306-591, 3d.1h.15m
    urlhaus-1: 4761-0, 18h.38m
    plowe-0: 3640-3, 9d.1h
filterset (user): [empty]
modifiedUserSettings: [none]
modifiedHiddenSettings: [none]
supportStats: 
  allReadyAfter: 747 ms
  maxAssetCacheWait: 265 ms
popupPanel: 
  blocked: 28
  blockedDetails: 
    instagram.com: 28
@MasterKia
Copy link
Member

Saw ads

Screenshot?

@krystian3w
Copy link
Contributor

Or save Dom tree to create ExtendedCSS (procedural) filter.

@krystian3w
Copy link
Contributor

Language specific, not everyone like English e.g. Italian 🇮🇹 or Spaniard / Spanish 🇪🇸.

@MasterKia
Copy link
Member

https://reddit.com/r/uBlockOrigin/comments/wmnwhf/ads_going_through_ublock_on_instagram_desktop/

A) instagram.com##article div:has-text(/Sponsored/i):upward(article)

B) instagram.com##article div:has-text(/Sponsored/i):upward(article > div)

C) instagram.com##article > div > div > div > header > div:nth-of-type(2) > div:nth-of-type(2) > div > div > span:has-text(/Sponsored/i):upward(article > div)

@krystian3w
Copy link
Contributor

IMO c to avoid match posts with lament to other influences with too much sponsored posts.

@okiehsch
Copy link
Contributor

okiehsch commented Aug 17, 2022

@MasterKia Are we sure that does not break anything, if that's the case add them.

I don't know much about it but could that not also hide some influencer instagram posts?

@MasterKia
Copy link
Member

AdGuard hasn't got any reports about instagram.com sponsored posts in the recent months:
https://github.com/AdguardTeam/AdguardFilters/issues?q=instagram.com

So I think we should wait and see if there are more reports about this in uAssets then we could add one of these filters.

@krystian3w
Copy link
Contributor

Have here AdguardTeam/AdguardFilters#123556 (first and last two @adguard-bot reports form 4 / 2 days ago and Alex 302 wrote suggestion).

@BruhMomient
Copy link

Have seen sponsored posts on the timeline, I'm assuming that's what OP is talking about?
Here's a screenshot.
instagram ad

@BruhMomient
Copy link

Have seen sponsored posts on the timeline, I'm assuming that's what OP is talking about? Here's a screenshot. instagram ad

Here's my config info also

uBlock Origin: 1.44.0
Firefox: 102
filterset (summary): 
  network: 176720
  cosmetic: 120068
  scriptlet: 32230
  html: 725
listset (total-discarded, last updated): 
  added: 
    https://winhelp2002.mvps.org/hosts.txt: 8730-342, 7m
    adguard-generic: 67014-5404, 8m
    adguard-mobile: 8149-210, 8m
    adguard-spyware: 26458-1371, 8m
    adguard-spyware-url: 713-2, 7m
    curben-phishing: 42401-7, 7m
    curben-pup: 189-0, 7m
    fanboy-cookiemonster: 39981-86, 7m
    dpollock-0: 11381-1635, 7m
  default: 
    user-filters: 0-0, never
    ublock-filters: 33202-69, 8m
    ublock-badware: 4237-0, 8m
    ublock-privacy: 247-0, 8m
    ublock-abuse: 76-0, 8m
    ublock-unbreak: 1872-1, 8m
    easylist: 69556-1023, 8m
    easyprivacy: 27354-9918, 7m
    urlhaus-1: 4828-0, 7m
    plowe-0: 3635-3, 7m
filterset (user): [empty]
trustedset: 
  added: [array of 5 redacted]
switchRuleset: 
  added: [array of 1 redacted]
modifiedUserSettings: [none]
modifiedHiddenSettings: [none]
supportStats: 
  allReadyAfter: 1585 ms (selfie)
  maxAssetCacheWait: 1057 ms
popupPanel: 
  blocked: 210
  blockedDetails: 
    instagram.com: 210

@MasterKia
Copy link
Member

@BruhMomient

Add these to "My filters" one by one and tell us which one (A, B or C) removes the sponsored posts:
#14370 (comment)

@krystian3w
Copy link
Contributor

krystian3w commented Aug 18, 2022

And if it blinks after scrolling then use Alex 302 suggestion with split to two filters:

instagram.com##main > section div[style^="flex-direction: column;"] > article > div:has(span:contains(Sponsored)):style(visibility: hidden !important;)

Or

instagram.com##main > section div[style^="flex-direction: column;"] > article > div:has(span:contains(Sponsored))

@MasterKia
Copy link
Member

@okiehsch
AdGuard fixed it:
AdguardTeam/AdguardFilters@6b57f3c

Should we add the same?

@okiehsch
Copy link
Contributor

Ok.

@MasterKia
Copy link
Member

I'm uncertain to add the "Sponsored" translated in Russian
(/Спонсор публикации:|Sponsored/))

@okiehsch
Copy link
Contributor

Yeah, let's keep it english only for now.

@krystian3w
Copy link
Contributor

krystian3w commented Aug 18, 2022

Maybe AdGuard Addons again disabled use:

tabs.insertCSS() / scripting.insertCSS()

Then hidding works bad on pages. Apps no support WebExtension API at all, then works similar like addon without this API.

@Yuki2718
Copy link
Contributor

@MasterKia :contains() is AG syntax.

@MasterKia
Copy link
Member

070ccff

@MasterKia
Copy link
Member

@krystian3w Why the dislike?

@krystian3w
Copy link
Contributor

These change should be confirmed from devtools about lag/delay in hide elements or ate too many RAM at start browser or forced update list.

@MasterKia
Copy link
Member

AFAIK uBO will internally change the compatible syntax at filter list compile time.

@krystian3w
Copy link
Contributor

This looks strange for conversion:

uBlockOrigin/uBlock-issues#2228

So it must be on a "strange" level that the error is not in EL syntax and deprecated :if(.

So if posts back in Chrome 105 (now served as stable) then needed is jump to development built.

@okiehsch okiehsch mentioned this issue Nov 7, 2022
9 tasks
@calvinthefreak
Copy link

Sadly Instagrams Adblocking breaks if you set instagram to any other Language then English...

in the German Version the "sponsored" text is "Gesponsert" and sadly thus the Ads show up...

@MasterKia
Copy link
Member

Does this work for you?

instagram.com#?#main > div > section div[style*="flex-direction: column;"] > article > div:has(span:has-text(/Gesponsert/)):style(visibility: hidden !important;)
instagram.com#?#main > div > section div[style*="flex-direction: column;"] > article > div:has(span:has-text(/Gesponsert/))

@Yuki2718
Copy link
Contributor

Yuki2718 commented Jan 3, 2023

AdguardTeam/AdguardFilters#138429

@calvinthefreak
Copy link

@MasterKia Yes, I added those rules my self, works, just wanted to check this for few Hours until answering here, but I think, that this rules should be added too.

@MasterKia
Copy link
Member

AdguardTeam/AdguardFilters#138429

But that bad filter is different from the one being discussed here.

@krystian3w
Copy link
Contributor

krystian3w commented Jan 3, 2023

Also possible spend time to create path inside :has(:

:has(> foo > bar > don-t > longer > touch-comments > span:has-text(Un anuncio muy molesta))

@Yuki2718
Copy link
Contributor

Yuki2718 commented Jan 3, 2023

But that bad filter is different from the one being discussed here.

Okay, confirmed the rule doesn't have the problem.

MasterKia added a commit that referenced this issue Jan 3, 2023
@MasterKia
Copy link
Member

Added.

@Yuki2718
Copy link
Contributor

Yuki2718 commented Jan 3, 2023

Maybe all the language? /Gesponsert|Sponsored|Geborg|Sponzorováno|Sponsoreret|Χορηγούμενη|Publicidad|Sponsoroitu|Sponsorisé|Bersponsor|Sponsorizzato|広告|광고|Ditaja|Sponset|Gesponsord|Sponsorowane|Patrocinado|Реклама|Sponsrad|ได้รับการสนับสนุน|May Sponsor|Sponsorlu|赞助内容|贊助|প্রযোজিত|પ્રાયોજિત|स्पॉन्सर्ड|Sponzorirano|ಪ್ರಾಯೋಜಿತ|സ്‌പോൺസർ ചെയ്‌തത്|पुरस्‍कृत|प्रायोजित|ਪ੍ਰਾਯੋਜਿਤ|මුදල් ගෙවා ප්‍රචාරය කරන ලදි|Sponzorované|விளம்பரதாரர்கள்|స్పాన్సర్ చేసింది|Được tài trợ|Спонсорирано|Commandité|Sponsorizat|Спонзорисано/
But I can't reproduce.

MasterKia added a commit that referenced this issue Jan 3, 2023
@MasterKia
Copy link
Member

Good idea.
Do you think the #?# is needed?
instagram.com#?#main > div > section div[style*="flex-direction: column;"] > article > div:has(span:has-text(...))

@Yuki2718
Copy link
Contributor

Yuki2718 commented Jan 3, 2023

Do you think the #?# is needed?

Don't know but it's safer to have it.

@krystian3w
Copy link
Contributor

krystian3w commented Jan 3, 2023

CSSTree omit/ignore ?, this was experimental fallback to force JavaScript implementation :has( instead native from Chrome 105+ for simple filters.

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

No branches or pull requests

7 participants