Created
September 25, 2023 08:18
-
-
Save natzir/d86fa1486bb7bfa8ce0847ddd522bb0d to your computer and use it in GitHub Desktop.
Pseudo-Element Highlighter Bookmarklet
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
javascript:(function(){function injectStyle(){var style=document.createElement('style');style.type='text/css';style.innerHTML='*::before, *::after {background-color: rgba(255,0,0,0.3) !important;}';document.head.appendChild(style);}injectStyle();})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bookmarklet is designed to assist web developers and SEO specialists in visually identifying content added using the ::before and ::after CSS pseudo-elements. When activated, it applies a semi-transparent red background to the content of these pseudo-elements, highlighting them on the page without altering or duplicating the existing content. This is especially useful in light of Google's recommendation against adding meaningful content or symbols using these pseudo-elements, as such content is not part of the DOM and is ignored by Google Search during indexing.