소스 검색

Added uBlock exception

master
Said Achmiz 6 년 전
부모
커밋
683c6fc702
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8
    0
      src/contentScript.js

+ 8
- 0
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 });
}

Loading…
취소
저장