mirror of
https://github.com/iv-org/invidious.git
synced 2025-12-18 09:52:29 -05:00
refactor: add mark_watched parameter with JavaScript
This commit is contained in:
parent
4b6037b658
commit
edc726858b
1 changed files with 11 additions and 0 deletions
|
|
@ -146,4 +146,15 @@
|
|||
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…
Add table
Add a link
Reference in a new issue