-
Notifications
You must be signed in to change notification settings - Fork 776
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
twitter.com: ads #20792
Comments
I can reproduce. Investigating an optimal solution. |
I forgot how cancerous the ads are on twitter... |
My suggestion (if filter authors agree):
For browsers which supports native
cc @ryanbr Since |
|
I added |
example: |
Efficiency-wise, this is a terrible filter, I advise people to not paste into my filters any such suggestion from non-experienced filter list authors. The goal here is to find the minimum set of efficient filters which fulfill the task. For now I will add |
|
If you want to report issue with that filter, post your troubleshooting information, this is a necessary step, just saying "it doesn't work" doesn't work: Go to |
@Hakkin Please post examples of tweets from such "verified business" which is not an ad. |
All the tweets on https://twitter.com/ibm, for example. There are many other verified business Twitter accounts. |
Ok I spotted one such verified business which was not an ad. Reverted. |
@rambling Good observation. So how about:
Feedback needed. |
Click to force an update of quick-fixes list to get the new filter: https://ublockorigin.github.io/uAssets/update-lists.html?listkeys=ublock-quick-fixes&manual=1 |
In rare cases, blank spaces or flickering occur. Is this the intended behavior? Troubleshooting Information
|
Gets rid of sponsored posts/ads but doesn't get rid of the trending sidebar and the such.
|
This isn't very stable of a filter, since the class names will update once they push a new frontend update |
@DaisukeDaisuke I get the blank spaces / flickering when I refresh a Twitter page and then immediately scroll down. |
@gorhill noticed something that the new filter doesn't block. Ads still show if you open a tweet through the image. Images![image](https://github.com/uBlockOrigin/uAssets/assets/16966523/14da0e63-2c3b-43b0-a4c7-713cfd5591e9) ![image](https://github.com/uBlockOrigin/uAssets/assets/16966523/01de7736-a255-4181-afc8-f90f911757e0)
Troubleshoot info (if not reproducible)uBlock Origin: 1.53.0 Chromium: 119 filterset (summary): network: 103496 cosmetic: 43782 scriptlet: 19068 html: 0 listset (total-discarded, last-updated): default: user-filters: 3-0, never easylist: 75532-16, 3h.20m easyprivacy: 32902-64, 3h.20m plowe-0: 3718-1078, 3h.20m ublock-badware: 7423-137, 3h.20m ublock-filters: 35635-156, 3h.20m ublock-privacy: 680-5, 3h.20m ublock-quick-fixes: 115-38, 3h.20m ublock-unbreak: 2155-32, 3h.20m urlhaus-1: 9855-0, 3h.20m filterset (user): [array of 3 redacted] trustedset: added: [array of 41 redacted] switchRuleset: added: [array of 3 redacted] userSettings: [none] hiddenSettings: [none] supportStats: allReadyAfter: 227 ms (selfie) maxAssetCacheWait: 110 ms |
@gorhill It also does not appear to block reply ads that appear with the image Ads have I am a beginner in filters, so please do not add it to My Filters as is
The html of the ad is as follows. McAfee is inserting html, but it's probably not relevant |
How about this filter for blocking reply ads that appear when you click on images? |
Sorry for reposting(i am confused) |
I was able to reproduce it using this URL using the latest filters, An ad will show in the rightmost column when you click to expand the main image. It's because that column doesn't have the Removing the |
|
#20807: |
I don't see the label "Ad" in that tweet: And the 3-dot menu doesn't have an entry like "About this ad", it's a plain tweet on my side. Also, the reporter's troubleshooting information doesn't show that the new filter was injected on the page:
Twitter is a long-lived page, people have to make sure that the page is reloaded after they force an update of filter lists. |
Yep, saw the same thing after a while of browsing |
Had that as well earlier but in the replies of a tweet with an image: Seems to omit the tracking HTML found earlier. Hard to reproduce (took at minimum 20 tries to get the one in the screenshot), but the earliest case I can find is this: https://twitter.com/MattBinder/status/1700227953043337662 First thought is to check graphQL request for the json object |
twitter.com##[aria-label^="Timeline:"] [data-testid="cellInnerDiv"] > div:has([data-testid="top-impression-pixel"]):remove() This filter fix both: #20792 (comment) #20792 (comment) Also if they add video ads this will prevent the video playing in the background. |
Anyone with dev build, can you test this filter? This one is to prune the ads post from the request using new update of twitter.com##+js(json-prune-xhr-response, data.home.home_timeline_urt.instructions.[].entries.[-].content.itemContent.promotedMetadata, , propsToMatch, url:/api/graphql) (Need to disable other cosmetic filters first for properly testing) Also, this one is for the ads in the comment. Based on the report in twitter.com##+js(json-prune-xhr-response, data.threaded_conversation_with_injections_v2.instructions.[].entries.[-].content.items.[].item.itemContent.promotedMetadata, , propsToMatch, url:/api/graphql) |
@stephenhawk8054 it targets these? Then looks like it works. |
Yup, I meant the posts with |
Looks working on home timeline and comments, but ofc not on search and promotion in right-side. It will be useful if we can use wildcard in the properties, or JSONPath specification to remove all |
It would be the same idea for search twitter.com##+js(json-prune-xhr-response, data.search_by_raw_query.search_timeline.timeline.instructions.[].entries.[-].content.itemContent.promotedMetadata, , propsToMatch, url:/api/graphql) Actually I would think clear separate json paths would be better for performance as they don't need to loop through many (nested) entries I can't reproduce the right side tho, and I don't know how they look like. It just shows "Trends for you" and "Who to follow" on my side. |
As JSONPath is specifically made to search and extract in json, I guess it's good addition anyway.
As with other ads, you have to refresh many times. Sometimes still may not be shown, then just test after a while. |
I think JSONPath-related would take quite some time to implement (if we decide to). It's not just this site, but I think the network-related scriptlets are mainly for co-operating with the cosmetic ones, to reduce the number of potential glitches/slipped caused by cosmetic filters, especially for dynamic big sites like this. Raw data are usually not manipulated as much as after they are represented in DOM (once they are in DOM, websites can do whatever they want via js and css), since those data could be used internally by the sites too. I think having solutions for 2 approaches at the same time would be good. |
Yeah, it's just if gorhill have time to implement. But Twitter/X has been changing structure and things like |
I wasn't aware of JSONPath, this will require some reading: https://www.ietf.org/archive/id/draft-ietf-jsonpath-base-03.html |
I think another aspect of JSONPath would be the selection based on the values in the objects? Which is not a concept in current For example, pruning a branch if there's an object |
Btw, I think we can test the above scriptlets in dev build first? |
Sure, go ahead. |
I guess AdguardTeam/AdguardFilters@019a78d is not covered? |
I don't think so. Need to be able to reproduce first. |
Ok, I think this works for me: x.com##+js(json-prune-xhr-response, data.immersiveMedia.timeline.instructions.[].entries.[-].content.itemContent.promotedMetadata, , propsToMatch, url:/ImmersiveMedia) |
Prerequisites
URL address of the web page
https://twitter.com/
Category
ads
Description
It seems twitter has done something so now ads are appearing in replies along with For You Page and Following.
Other extensions used
none
Screenshot(s)
Screenshot(s)
Configuration
The text was updated successfully, but these errors were encountered: