Skip to content

Instantly share code, notes, and snippets.

@Stevoisiak
Last active February 6, 2026 21:48
Show Gist options
  • Select an option

  • Save Stevoisiak/c608fb8e40f55dcd1d6b37dd6549a324 to your computer and use it in GitHub Desktop.

Select an option

Save Stevoisiak/c608fb8e40f55dcd1d6b37dd6549a324 to your computer and use it in GitHub Desktop.
Test filters for Google's AI Overview. To use, paste these in the "My Filters" section of the uBlock dashboard. Also, in "Filter lists", uncheck "Stevo's GenAI Blocklist"
! =====================
! == Google (search) ==
! =====================
! -- Homepage (https://www.google.com/)
! Search bar > "AI Mode" button
www.google.com,www.google.co.jp,www.google.com.hk##button[jsname="B6rgad"]
! Footer - "Applying AI towards science and the environment"
www.google.com,www.google.co.jp,www.google.com.hk##.pHiOh[href="https://ai.google/societal-impact/?utm_source=googlehpfooter&utm_medium=housepromos&utm_campaign=bottom-footer"]
! Mobile site - Search bar - AI button (magnifying glass icon)
www.google.com,www.google.co.jp,www.google.com.hk##button.xOchs
! -- Search results (https://www.google.com/search?q=Why+is+this)
! Navbar > "AI Mode" tab
! Desktop
www.google.com,www.google.co.jp,www.google.com.hk##div[role="listitem"][jsname] > div.olrp5b
! Mobile
www.google.com,www.google.co.jp,www.google.com.hk##div[role="listitem"][jsname] > div > div.olrp5b
! Backup filter
! Adapted from https://old.reddit.com/r/techsupport/comments/1kt8dds/how_to_remove_ai_mode_on_google_search_selection/njltdug/
www.google.com,www.google.co.jp,www.google.com.hk##[role="navigation"] [role="list"]>[role="listitem"]:has([href^="/search"][href*="&udm=50"])
! - AI Overview
! These filters are somewhat speculative due to Google having multiple formats for AI overviews.
! Element names may change based on the search terms used, switching to mobile or desktop, logging in or out of Google, using an international site (google.com.hk), etc.
! Test cases
! - AI: (https://www.google.com/search?q=Why+are+we+here)
! - AI with sources on side: (https://www.google.com/search?q=Celeste+release+date)
! - AI with non-AI info-box below: (https://www.google.com/search?q=mario+64+release+date)
! - AI with "thinking" preloader: (https://www.google.com/search?q=unity+compute+dispatch+editor)
! - AI with "thinking" preloader that sometimes appears in middle of search results (https://www.google.com/search?q=ublock+ai+results+not+showing+results)
! - AI on Hong Kong site: (https://www.google.com.hk/search?q=mario+64+release+date)
! - AI on Japan site: (https://www.google.co.jp/search?q=Why+am+i+here)
! - Calculator with no AI: (https://www.google.com/search?q=calculator)
! - Non-ai infobox: (https://www.google.com/search?q=Halo+release+date)
! - AI infobox (check on mobile): (https://www.google.com/search?q=ghola+dune)
! AI Overview
www.google.com,www.google.co.jp,www.google.com.hk##[data-attnms]
! Container for AI Overview when located on top of search results
! alt: www.google.com,www.google.co.jp,www.google.com.hk###Odp5De:has([data-attnms])
www.google.com,www.google.co.jp,www.google.com.hk###Odp5De:has(> div.YNk70c.EjQTId > div.Kevs9.SLPe5b > div[jscontroller] > div#eKIzJc > div.YzCcne > div.hdzaWe > div[data-attnms])
! Blank padding above AI Overview when located at top of search results
! alt: www.google.com,www.google.co.jp,www.google.com.hk##div.YNk70c.EjQTId:has(+ div[data-hveid] > div[data-hveid] > div#Odp5De)
www.google.com,www.google.co.jp,www.google.com.hk##div.YNk70c.EjQTId:has(+ div[data-hveid] > div[data-hveid] > div#Odp5De > div.YNk70c.EjQTId > div.Kevs9.SLPe5b > div[jscontroller] > div#eKIzJc > div.YzCcne > div.hdzaWe > div[data-attnms])
! Pregenerated AI Infobox (Mobile only)
! When testing these rules, use a mobile device or mobile device emulation in browser dev tools
! Example URLs
! - https://www.google.com/search?q=ghola+dune
! - https://www.google.com/search?q=Mario+%28franchise%29
www.google.com###center_col > div > div[data-hveid] > #rso > .MjjYud:has(div > div.MBttkb > div > div > div > .DuQANe.MSJHRb)
www.google.com###center_col > div > div[data-hveid] > #rso > .MjjYud:has(+ .MjjYud:has(div > div.MBttkb > div > div > div > .DuQANe.MSJHRb))
! Backup AI Overview filters
! These leave a large blank space, but are a good catch-all
! Credit to https://inwiring.com/google-ai-overviews/ for [data-aquarium] and [data-subtree="mfc"] filters
www.google.com,www.google.co.jp,www.google.com.hk##[data-aquarium]
www.google.com,www.google.co.jp,www.google.com.hk##[data-subtree="mfc"]
www.google.com,www.google.co.jp,www.google.com.hk##[data-subtree="mfc,mfl"]
www.google.com,www.google.co.jp,www.google.com.hk##[data-attnms]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment