Skip to content

Instantly share code, notes, and snippets.

@teroyks
Last active January 24, 2020 13:28
Show Gist options
  • Save teroyks/50ee6b202c4921f7c21c165eb59386b4 to your computer and use it in GitHub Desktop.
Save teroyks/50ee6b202c4921f7c21c165eb59386b4 to your computer and use it in GitHub Desktop.
Highlight ads in Google search results

Install a user scripts extension, for example Stylish for Chrome to enable custom styles for a website.

In Stylish, install a user style:

  1. Click on the Stylish icon on the Chrome toolbar, and select Create New Style from the action menu ( ⠇).
  2. Copy the CSS style from code.cssinto the Code field.
  3. Set the Applies to method to URLs matching the regexp and copy the value from URL regex.
  4. Give a name to your custom style and save.
.ads-ad {
background-color: pink;
border: 1px red dashed;
padding: .1rem;
}
https://(www\.)?google\.\w+/search\b.*
@teroyks
Copy link
Author

teroyks commented Jan 24, 2020

You can of course set whatever styles to the ad you like – for example by replacing the example with display: none the ads are not shown in the search results.

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