mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 05:27:03 +03:00
Add support for live updating in chrome
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
export function cleanPage() {
|
||||
// For live-updates
|
||||
for (const element of document.querySelectorAll("#categoryPillParent, .playerButton, .sponsorThumbnailLabel, #submissionNoticeContainer, .sponsorSkipNoticeContainer, #sponsorBlockPopupContainer, .skipButtonControlBarContainer, #previewbar")) {
|
||||
element.remove();
|
||||
if (document.readyState === "complete") {
|
||||
for (const element of document.querySelectorAll("#categoryPillParent, .playerButton, .sponsorThumbnailLabel, #submissionNoticeContainer, .sponsorSkipNoticeContainer, #sponsorBlockPopupContainer, .skipButtonControlBarContainer, #previewbar, .sponsorBlockChapterBar")) {
|
||||
element.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user