forked from OsaSoft/youtube-better-subscriptions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvid.js
More file actions
21 lines (18 loc) · 633 Bytes
/
Copy pathvid.js
File metadata and controls
21 lines (18 loc) · 633 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function onVideoPage() {
if (settings["settings.hide.watched.auto.store"]) {
let videoId = new URL(window.location.href).searchParams.get("v");
if (!videoId) return;
log("Marking video " + videoId + " as watched from video page");
watchVideo(videoId);
syncWatchedVideos();
}
}
function onShortPage() {
if (settings["settings.hide.watched.auto.store"]) {
let videoId = getCurrentPage().split('/')[2];
if (!videoId) return;
log("Marking short " + videoId + " as watched from shorts page");
watchVideo(videoId);
syncWatchedVideos();
}
}