diff options
-rw-r--r-- | web/bookmarklet/add-outline | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/web/bookmarklet/add-outline b/web/bookmarklet/add-outline new file mode 100644 index 0000000..880e9ff --- /dev/null +++ b/web/bookmarklet/add-outline | |||
@@ -0,0 +1,15 @@ | |||
1 | javascript: (function() { | ||
2 | let domStyle = document.getElementById('domStylee'); | ||
3 | if (domStyle) { | ||
4 | document.body.removeChild(domStyle); | ||
5 | return; | ||
6 | } | ||
7 | domStyle = document.createElement("style"); | ||
8 | domStyle.setAttribute('id', 'domStylee'); | ||
9 | color = Math.random() * (1<<24); | ||
10 | color = Math.floor(color).toString(16); | ||
11 | domStyle.append( | ||
12 | [`* { outline: 1px solid #${color}; outlineOffsset: -1px }`] | ||
13 | ); | ||
14 | document.body.appendChild(domStyle); | ||
15 | })(); | ||