Skip to content

Instantly share code, notes, and snippets.

@coolaj86
Last active February 25, 2026 18:46
Show Gist options
  • Select an option

  • Save coolaj86/69ef7a810c8fd5c04aed49dde6338f31 to your computer and use it in GitHub Desktop.

Select an option

Save coolaj86/69ef7a810c8fd5c04aed49dde6338f31 to your computer and use it in GitHub Desktop.
Remove Ads from Grok

Grok Clean – Hide "For You" Highlights & Ads Below Prompt Bar

A tiny Chrome extension that removes the promotional "For You" section (news/highlight cards) and related upsell elements that appear below the chat input bar on https://grok.com.

Screenshot 2026-02-22 at 1 33 43 PM Screenshot 2026-02-22 at 1 33 19 PM

https://grok.com/share/bGVnYWN5LWNvcHk_4920161a-1f9c-4704-93a2-768302a0ce01

Tested on Chrome / Edge (Manifest V3).

Features

  • Hides the "For You" curated highlights feed
  • Removes linked news/story cards
  • Uses MutationObserver + periodic cleanup to handle React SPA updates
  • Keeps the feature buttons (DeepSearch, Imagine, etc.) by default — optional aggressive mode available in code

Installation (Load as Unpacked Extension)

Follow these steps to install from this gist:

  1. Download the files

    • Option A (easiest – one click):

      • Go to the Raw view of each file:
      • Right-click → Save As (or Ctrl+S) each file
      • Save both files into a new empty folder on your computer (e.g. C:\Extensions\grok-clean or ~/grok-clean)
    • Option B (clone the whole gist via git – recommended if you want updates later):

      git clone https://gist.github.com/coolaj86/69ef7a810c8fd5c04aed49dde6338f31.git ./grok-clean
      cd ./grok-clean/

      (The folder will contain manifest.json and content.js)

  2. Open Chrome Extensions page

    • In Chrome, paste this URL into the address bar and press Enter: chrome://extensions/
  3. Enable Developer mode

    • In the top-right corner, toggle the switch labeled Developer mode to ON
  4. Load the extension

    • Click the button that appears: Load unpacked
    • Navigate to and select the folder you created in step 1 (the one containing manifest.json and content.js)
    • Click Select Folder / Open
  5. Done!

    • The extension should now appear in your list as "Grok Clean - Hide Prompt Bar Ads/Upsells"
    • Go to https://grok.com, start a new chat — the "For You" section and cards should be gone

Updating the Extension

  • If you used git: run git pull in the folder, then go back to chrome://extensions/, find this extension, and click the Reload button (circular arrow icon).
  • If you downloaded files manually: replace the old files with newer ones, then reload the extension the same way.

Optional: Make it more aggressive

Open content.js and uncomment the block under // === Option A: if you also want to hide the button row (DeepSearch, Imagine, Pick Personas, Voice Chat).

Troubleshooting

  • Nothing happens? → Refresh grok.com or reload the extension
  • Hides too much? → Edit selectors in content.js and reload
  • Icons missing? → The extension works without them; icons are optional (you can ignore the warning)

Enjoy a cleaner Grok experience!
Made with ❤️ by the community Grok • Inspired by @_beyondcode

function hideForYou() {
document.querySelectorAll("h2").forEach((h) => {
if (h.textContent.trim().toLowerCase().includes("for you")) {
let box = h.closest(".w-full");
if (box) box.remove();
}
});
}
// Run many times quickly at the beginning (React is slow sometimes)
const timer = setInterval(hideForYou, 50);
setTimeout(() => {
clearInterval(timer);
}, 15000); // stop after 15 seconds
// Keep an eye out forever in case something re-appears
setInterval(hideForYou, 1000);
{
"manifest_version": 3,
"name": "Grok Clean - Hide Prompt Bar Ads/Upsells",
"description": "Removes promotional banners, upgrade prompts, and ads below the Grok chat input field",
"version": "1.1",
"author": "Inspired by user @_beyondcode",
"permissions": [
"activeTab"
],
"content_scripts": [
{
"matches": [
"https://grok.com/*",
"https://*.grok.com/*"
],
"js": ["content.js"],
"run_at": "document_end",
"all_frames": false
}
],
"icons": {
}
}
@coolaj86
Copy link
Author

Screenshot 2026-02-22 at 1 33 19 PM Screenshot 2026-02-22 at 1 33 43 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment