From 728e07e8160920899883a8517dbca521fae0289f Mon Sep 17 00:00:00 2001 From: blankie Date: Thu, 28 Sep 2023 20:11:27 +1000 Subject: [PATCH] Update Hide sticky elements to 1.1.1 - Fix position: absolute elements not being hidden (example: https://popular.info/p/florida-school-district-orders-librarians) --- Hide sticky elements.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Hide sticky elements.user.js b/Hide sticky elements.user.js index 23e1f64..8fb3766 100644 --- a/Hide sticky elements.user.js +++ b/Hide sticky elements.user.js @@ -5,7 +5,7 @@ // @grant GM_registerMenuCommand // @grant GM_unregisterMenuCommand // @grant GM_addStyle -// @version 1.1.0 +// @version 1.1.1 // @author blankie // @description Adds a button to the monkey menu to hide sticky elements // @inject-into content @@ -36,7 +36,7 @@ function handleOneNode(node, removed = false) { } let computedStyle = getComputedStyle(node); - let isSticky = computedStyle.position === "sticky" || computedStyle.position === "fixed"; + let isSticky = /^(sticky|fixed|absolute)$/.test(computedStyle.position); if (!stickyElements.has(node) && isSticky && !removed) { node.classList.add("hseSticky"); stickyElements.add(node);