diff options
| author | Hsieh Chin Fan <typebrook@topo.tw> | 2023-02-04 09:03:29 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <typebrook@topo.tw> | 2023-02-04 09:03:29 +0800 |
| commit | 64ebcef8049fe0ed85594a35185089c8dd44fbcb (patch) | |
| tree | 8a5109bbf104048caf3c92885b368cde6ee923fc /web/bookmarklet/kill | |
| parent | 825c29b5e0740b27439003f21e1a1a74e563cfd5 (diff) | |
| parent | e63dea4ef9a346ee1912f03143dce123ce3ebe07 (diff) | |
Merge remote-tracking branch 'origin/dev' into dev
Diffstat (limited to 'web/bookmarklet/kill')
| -rw-r--r-- | web/bookmarklet/kill | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ | |||
| 1 | javascript: (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 | })(); | ||