Skip to content

Instantly share code, notes, and snippets.

@nilayk
Last active March 24, 2023 20:07
Show Gist options
  • Save nilayk/ca6dd5b15f958efb5d2e20c3caca3a9f to your computer and use it in GitHub Desktop.
Save nilayk/ca6dd5b15f958efb5d2e20c3caca3a9f to your computer and use it in GitHub Desktop.
Tampermonkey Script - Google Ad Highlighter
// ==UserScript==
// @name Google Ad Highlighter
// @namespace https://gist.github.com/nilayk/ca6dd5b15f958efb5d2e20c3caca3a9f/
// @version 1.1
// @description Highlight Google Ads in search results
// @author Nilay Khandelwal
// @include *google.com/search*
// @downloadURL https://gist.githubusercontent.com/nilayk/ca6dd5b15f958efb5d2e20c3caca3a9f/raw/Google%2520Ad%2520Highlighter.user.js
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle(`
div[aria-label='Ads'] div[data-hveid] > div {
background-color: rgb(255, 204, 0) !important;
background-color: rgba(255, 204, 0, 0.1) !important;
-webkit-border-radius: 8px !important;
-moz-border-radius: 8px !important;
border-radius: 8px !important;
-webkit-background-clip: padding-box !important;
-moz-background-clip: padding !important;
background-clip: padding-box !important;
padding: 8px !important;
}
span.p8AiDd{
background-color: rgb(255, 204, 0);
background-color: rgba(255, 204, 0, 0);
}
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment