Last active
August 21, 2020 07:45
-
-
Save szepeviktor/83f8f1f12a10fb17bc222710d50b4452 to your computer and use it in GitHub Desktop.
Google Search ads old green style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Google Search old green ads | |
// @description Mark ads with green "Ad" tag | |
// @author https://gist.github.com/szepeviktor/83f8f1f12a10fb17bc222710d50b4452 | |
// @icon https://www.google.com/favicon.ico | |
// @version 0.7.0 | |
// @grant none | |
// @run-at document-idle | |
// @include https://www.google.*/search?* | |
// ==/UserScript== | |
let styleSheet = document.createElement("style"); | |
styleSheet.type = "text/css"; | |
// Add green background, hide dot + Alternative (w-visurl element) | |
styleSheet.innerHTML = | |
"[aria-label='Ads'] li a[data-ved] > div:not([aria-level]) > span:first-child { background-color: #59946B; color: white; border-radius: 5px; padding: 0 5px; margin-right: 4px; }" | |
+ "[aria-label='Ads'] li a[data-ved] > div:not([aria-level]) > span:first-child > span { display: none; }" | |
+ "[aria-label='Ads'] li a[data-ved] > w-visurl > div > span:first-child { background-color: #59946B; color: white; border-radius: 5px; padding: 0 5px; margin-right: 4px; }" | |
+ "[aria-label='Ads'] li a[data-ved] > w-visurl > div > span:first-child > span { display: none; }"; | |
document.body.appendChild(styleSheet); |
Author
szepeviktor
commented
Jun 29, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment