Skip to content

Commit

Permalink
First Version
Browse files Browse the repository at this point in the history
  • Loading branch information
zbarnz committed Apr 21, 2024
0 parents commit 1821990
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Google AI Overviews Blocker

## Overview

Google AI Overviews Blocker is a browser extension that enhances user experience by hiding AI-generated overviews in Google search results. This extension is for you if you prefer a cleaner, more traditional search result page without AI-powered summaries.

## Features

- **Clean Interface**: Automatically hides all AI-generated overviews from Google search results.
- **User Control**: Offers users more control over the content displayed in their search results.
- **Easy to Use**: Simple installation and effortless interaction.

## Installation

1. Download the extension from the chrome webstore: (waiting approval)
2. Add it to your browser by clicking on 'Add to Chrome'.
3. Once installed, the extension will automatically activate, and you will see AI overviews removed from your search results.

## Usage

No configuration is needed. Once installed, AI Overviews Blocker works automatically. You can disable or enable it anytime from the browser extension menu.

## Support

For support, feature requests, or to report a bug, please visit the [GitHub Issues](https://github.com/zbarnz/Google_AI_Overviews_Blocker/issues) page for the extension.


### [Follow me on GitHub](https://github.com/zbarnz)
27 changes: 27 additions & 0 deletions content.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//Backup script if content is every dynamically loaded
//or if CSS fails for whatever reason...

var AIheaders = document.querySelectorAll("h1");
var AIparentElement = document.querySelector(".M8OgIe");
var AIparentElementPreLoad = document.querySelector(".rEow3c");

if (
AIparentElementPreLoad &&
AIparentElementPreLoad.firstChild.tagName === "H1" &&
AIparentElementPreLoad.firstChild.textContent.trim() === "Search Results"
) {
AIparentElementPreLoad.style.display = "none";
} else if (
AIparentElement &&
AIparentElement.firstChild.tagName === "H1" &&
AIparentElement.firstChild.textContent.trim() === "Search Results"
) {
AIparentElement.style.display = "none";
} else {
// Iterate through each h1 element to find the one with the exact text "AI Overview"
Array.from(AIheaders).forEach(function (header) {
if (header.textContent.trim() === "AI Overview") {
header.parentNode.style.display = "none";
}
});
}
Binary file added icons/strikeAI128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/strikeAI16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/strikeAI48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"manifest_version": 3,
"name": "Hide Google AI Overviews",
"version": "1.0",
"description": "Hide annoying Google AI Overviews.",
"icons": {
"16": "icons/strikeAI16.png",
"48": "icons/strikeAI48.png",
"128": "icons/strikeAI128.png"
},
"content_scripts": [
{
"matches": ["*://*.google.com/*"],
"js": ["content.js"],
"css": ["styles.css"]
}
]
}
3 changes: 3 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.M8OgIe, .rEow3c {
display: none !important;
}

0 comments on commit 1821990

Please sign in to comment.