aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@topo.tw>2023-02-03 09:51:17 +0800
committerHsieh Chin Fan <typebrook@topo.tw>2023-02-03 09:51:17 +0800
commit01a78df545ee067d79d7d0f63d83733456332da5 (patch)
treedb012b53729737beecc0704807f6815721ca1bf4
parent74985a25c0b0cd1818a298bd4e02c41faf4c61f4 (diff)
Update
-rw-r--r--web/bookmarklet/add-outline15
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 @@
1javascript: (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})();