From 683c6fc702796e4d749dba87b67d1e24ef6c347e Mon Sep 17 00:00:00 2001 From: achmizs Date: Tue, 5 Feb 2019 14:48:31 -0500 Subject: [PATCH] Added uBlock exception --- src/contentScript.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/contentScript.js b/src/contentScript.js index bfa70f5..03b4884 100644 --- a/src/contentScript.js +++ b/src/contentScript.js @@ -62,8 +62,16 @@ function killSticky(root) { root.querySelectorAll('*').forEach(element => { if (getComputedStyle(element).position === 'fixed' || getComputedStyle(element).position === 'sticky') { + // uBlock exception. + if (element.tagName == "IFRAME" && + element.parentElement.tagName == "HTML") + return; + + // Kill the sticky. console.log("Killing sticky!"); element.remove(); + + // Increment the stickies killed count, and update icon badge. AKS.stickiesKilled++; chrome.runtime.sendMessage({ newBadgeText: "" + AKS.stickiesKilled }); }