Hides the "Grok" AI assistant on Twitter
Twitter: hide Grok in sidebar by rybak
Details
Authorrybak
LicenseCC Zero
Categorytwitter.com
Created
Updated
Size1.1 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
This userstyle works even in Firefox for Android!
See also style Twitter: hide Verified/Premium in sidebar. If you don't like recent renaming of Twitter, userscript Twitter: bring back old name and logo is great.
Changelog
- v6: hide "Try it" ads
- v5: hide "explain this post" button
- v4: hide "generate image" button in tweet editor/composer
- v3: hide some of the ads about Grok
- v2: added support for https://x.com
- v1: initial release
Source code
/* ==UserStyle==
@name Twitter: hide Grok in sidebar
@namespace github.com/rybak
@version 6
@description Hides the "Grok" AI assistant on Twitter
@homepageURL https://github.com/rybak/
@license CC Zero
@author Andrei Rybak
==/UserStyle== */
@-moz-document domain("twitter.com"),
domain("x.com") {
/* hide links to Grok in the sidebar */
[aria-label="Grok"],
nav [href="/i/grok"] {
display: none;
}
/* hide Grok ads in the timeline */
section > div > div > div:has(img[src$="grok2_upsell_candidate_1.png"]),
section > div > div > div:has(img[src$="grok2_upsell_candidate_1.png"]) + div {
display: none;
}
/* hide "Try it" ad */
section > div > div > div:has(a[href^="/i/grok"]),
section > div > div > div:has(a[href^="/i/grok"]) + div {
display: none;
}
/* hide Grok image generation button in tweet editor */
div:has(> button[data-testid="grokImgGen"]) {
display: none;
}
/* hide "explain with grok" button */
div:has(> button[aria-label="Grok actions"]) {
display: none;
}
/* border: 1px solid magenta; */
}