Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #84 from tkvarun35/chaptersSectionFix
Browse files Browse the repository at this point in the history
Added Fix: Preventing to delete the Chapter Section.
  • Loading branch information
TheRealJoelmatic authored Nov 2, 2023
2 parents 4c40ea6 + 9b49a32 commit 8f71e13
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Youtube-Ad-blocker-Reminder-Remover.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,17 @@
mainContainer?.remove();
feedAd?.remove();
mastheadAd?.remove();
sponsor?.forEach(element => element.remove());
sponsor?.forEach((element) => {
if (element.getAttribute("id") === "panels") {
element.childNodes?.forEach((childElement) => {
if (childElement.data.targetId && childElement.data.targetId !=="engagement-panel-macro-markers-description-chapters")
//Skipping the Chapters section
childElement.remove();
});
} else {
element.remove();
}
});
nonVid?.click();
}, 50)
}
Expand Down Expand Up @@ -203,4 +213,4 @@
{
removeJsonPaths(domainsToRemove, jsonPathsToRemove);
});
})();
})();

0 comments on commit 8f71e13

Please sign in to comment.