mirror of
https://github.com/iv-org/invidious.git
synced 2025-12-25 07:08:30 -06:00
refactor: add mark_watched parameter with JavaScript
This commit is contained in:
parent
4b6037b658
commit
edc726858b
@ -146,4 +146,15 @@
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Handle the video watched state with JavaScript (if enabled)
|
||||||
|
const anchorElements = document.querySelectorAll('a[href^="/watch"]');
|
||||||
|
|
||||||
|
for (const anchorElement of anchorElements) {
|
||||||
|
const url = new URL(anchorElement.href);
|
||||||
|
|
||||||
|
url.searchParams.set("mark_watched", "0");
|
||||||
|
|
||||||
|
anchorElement.href = url.href;
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user