From e60b33c82b02ae04cb7acde079fd9c5ad2044ecc Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 3 Feb 2023 11:37:28 +0800 Subject: Update --- web/bookmarklet/kill | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 web/bookmarklet/kill (limited to 'web') 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 @@ +javascript: (function(){ + document.querySelectorAll("body *").forEach(function(node) { + if(["fixed","sticky"].includes(getComputedStyle(node).position)) { + node.parentNode.removeChild(node); + } + }); + document.querySelectorAll("html *").forEach(function(node) { + var s=getComputedStyle(node); + if("hidden"===s["overflow"]) { + node.style["overflow"]="visible"; + } + if("hidden"===s["overflow-x"]) { + node.style["overflow-x"]="visible"; + } + if("hidden"===s["overflow-y"]) { + node.style["overflow-y"]="visible"} + }); + var htmlNode=document.querySelector("html"); + htmlNode.style["overflow"]="visible"; + htmlNode.style["overflow-x"]="visible"; + htmlNode.style["overflow-y"]="visible"; +})(); -- cgit v1.2.3-70-g09d2