mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
Close skip to highlight when changing videos
This commit is contained in:
@@ -252,6 +252,8 @@ function resetValues() {
|
|||||||
for (let i = 0; i < skipNotices.length; i++) {
|
for (let i = 0; i < skipNotices.length; i++) {
|
||||||
skipNotices.pop().close();
|
skipNotices.pop().close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skipButtonControlBar?.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function videoIDChange(id) {
|
async function videoIDChange(id) {
|
||||||
@@ -727,6 +729,7 @@ function retryFetch(): void {
|
|||||||
//check if this video was uploaded recently
|
//check if this video was uploaded recently
|
||||||
utils.wait(() => !!videoInfo).then(() => {
|
utils.wait(() => !!videoInfo).then(() => {
|
||||||
const dateUploaded = videoInfo?.microformat?.playerMicroformatRenderer?.uploadDate;
|
const dateUploaded = videoInfo?.microformat?.playerMicroformatRenderer?.uploadDate;
|
||||||
|
console.log(dateUploaded)
|
||||||
|
|
||||||
//if less than 3 days old
|
//if less than 3 days old
|
||||||
if (Date.now() - new Date(dateUploaded).getTime() < 259200000) {
|
if (Date.now() - new Date(dateUploaded).getTime() < 259200000) {
|
||||||
|
|||||||
Reference in New Issue
Block a user