Close skip to highlight when changing videos

This commit is contained in:
Ajay Ramachandran
2021-08-20 18:43:44 -04:00
parent c79b06aed3
commit 585038c902

View File

@@ -252,6 +252,8 @@ function resetValues() {
for (let i = 0; i < skipNotices.length; i++) {
skipNotices.pop().close();
}
skipButtonControlBar?.disable();
}
async function videoIDChange(id) {
@@ -727,6 +729,7 @@ function retryFetch(): void {
//check if this video was uploaded recently
utils.wait(() => !!videoInfo).then(() => {
const dateUploaded = videoInfo?.microformat?.playerMicroformatRenderer?.uploadDate;
console.log(dateUploaded)
//if less than 3 days old
if (Date.now() - new Date(dateUploaded).getTime() < 259200000) {