Last active
September 26, 2022 14:02
-
-
Save kaezarrex/a7857459c6055fbf843dcc76a100fab5 to your computer and use it in GitHub Desktop.
data-id 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body { font: 20px monospace; margin: 20px; } | |
a { border-radius: 5px; background-color: #ddd; padding: 10px;} | |
</style> | |
</head> | |
<body> | |
<a href="javascript:(function(){ var style = document.createElement(%27style%27), styleContent = document.createTextNode(%27[data-id] { box-shadow: 0 0 2px red !important; } [data-id]:before { content: attr(data-id) !important; display: block !important; position: absolute !important; background-color: red !important; padding: 2px !important; color: white !important; z-index: 9000 !important; pointer-events: none !important; font: 800 12px monospace !important; opacity: 0.8 !important; }%27); style.appendChild(styleContent ); var caput = document.getElementsByTagName(%27head%27); caput[0].appendChild(style); })();">data-id</a> | |
<span>← drag to your bookmarks bar</span> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what does this do?