Bladeren bron

Added uBlock exception

master
Said Achmiz 7 jaren geleden
bovenliggende
commit
683c6fc702
1 gewijzigde bestanden met toevoegingen van 8 en 0 verwijderingen
  1. 8
    0
      src/contentScript.js

+ 8
- 0
src/contentScript.js Bestand weergeven

root.querySelectorAll('*').forEach(element => { root.querySelectorAll('*').forEach(element => {
if (getComputedStyle(element).position === 'fixed' || if (getComputedStyle(element).position === 'fixed' ||
getComputedStyle(element).position === 'sticky') { getComputedStyle(element).position === 'sticky') {
// uBlock exception.
if (element.tagName == "IFRAME" &&
element.parentElement.tagName == "HTML")
return;

// Kill the sticky.
console.log("Killing sticky!"); console.log("Killing sticky!");
element.remove(); element.remove();

// Increment the stickies killed count, and update icon badge.
AKS.stickiesKilled++; AKS.stickiesKilled++;
chrome.runtime.sendMessage({ newBadgeText: "" + AKS.stickiesKilled }); chrome.runtime.sendMessage({ newBadgeText: "" + AKS.stickiesKilled });
} }

Laden…
Annuleren
Opslaan