-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.css
More file actions
38 lines (33 loc) · 1.83 KB
/
Copy pathcontent.css
File metadata and controls
38 lines (33 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* X Mate — ad hiding rules. Scoped under html[data-xmate="on"] so the popup toggle
can disable everything instantly by flipping one attribute. */
/* Promoted / "Ad" tweets in the timeline: X wraps every ad with a
data-testid="placementTracking" impression-pixel block as a sibling of the
actual tweet inside the same virtualized list cell. Hiding the whole cell
removes both the pixels and the promoted tweet.
X reuses that same testid for the wrapper its video player mounts into,
which lives *inside* the tweet's <article>. That wrapper only appears once
playback starts, so matching it here would make an ordinary video vanish
the moment you press play — hence the :not() escape hatch. Promoted videos
have both wrappers, so they fall through to the [data-xmate-ad] rule below
which content.js flags. */
html[data-xmate="on"] div[data-testid="cellInnerDiv"]:has(div[data-testid="placementTracking"]):not(:has(article div[data-testid="placementTracking"])) {
display: none !important;
}
/* Set by content.js on cells whose placementTracking block sits outside the
tweet's <article> — the reliable "this is an ad" signal. */
html[data-xmate="on"] div[data-testid="cellInnerDiv"][data-xmate-ad] {
display: none !important;
}
/* Sidebar "Who to follow" ad slot (Google Ad Manager / SSP banner). */
html[data-xmate="on"] [data-testid="whoToFollowSspAd"] {
display: none !important;
}
/* Generic catch-all: any Google Ad Manager (GPT) slot or iframe rendered
anywhere else on the page (trends module, profile pages, etc.). */
html[data-xmate="on"] div[id^="div-gpt-ad"],
html[data-xmate="on"] div[id^="google_ads_iframe"],
html[data-xmate="on"] iframe[id^="google_ads_iframe"],
html[data-xmate="on"] iframe[src*="googlesyndication.com"],
html[data-xmate="on"] iframe[src*="doubleclick.net"] {
display: none !important;
}