aboutsummaryrefslogtreecommitdiffhomepage
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/bookmarklet/add-map9
-rw-r--r--web/bookmarklet/add-outline15
-rw-r--r--web/bookmarklet/kill22
3 files changed, 46 insertions, 0 deletions
diff --git a/web/bookmarklet/add-map b/web/bookmarklet/add-map
new file mode 100644
index 0000000..4a4251a
--- /dev/null
+++ b/web/bookmarklet/add-map
@@ -0,0 +1,9 @@
1javascript: (function() {
2 mapDiv = document.createElement("div");
3 mapDiv.setAttribute("class", 'map');
4 document.body.append(mapDiv);
5 script = document.createElement("script");
6 script.src = 'https://unpkg.com/mapclay@0.1.3/js/mapclay.js';
7 script.type = 'module';
8 document.body.append(script);
9})();
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})();
diff --git a/web/bookmarklet/kill b/web/bookmarklet/kill
new file mode 100644
index 0000000..7eb82e3
--- /dev/null
+++ b/web/bookmarklet/kill
@@ -0,0 +1,22 @@
1javascript: (function(){
2 document.querySelectorAll("body *").forEach(function(node) {
3 if(["fixed","sticky"].includes(getComputedStyle(node).position)) {
4 node.parentNode.removeChild(node);
5 }
6 });
7 document.querySelectorAll("html *").forEach(function(node) {
8 var s=getComputedStyle(node);
9 if("hidden"===s["overflow"]) {
10 node.style["overflow"]="visible";
11 }
12 if("hidden"===s["overflow-x"]) {
13 node.style["overflow-x"]="visible";
14 }
15 if("hidden"===s["overflow-y"]) {
16 node.style["overflow-y"]="visible"}
17 });
18 var htmlNode=document.querySelector("html");
19 htmlNode.style["overflow"]="visible";
20 htmlNode.style["overflow-x"]="visible";
21 htmlNode.style["overflow-y"]="visible";
22})();