From 8175ef1cd145d68b987efece442ae244bef892e4 Mon Sep 17 00:00:00 2001 From: Ewy~ Date: Tue, 23 Dec 2025 15:38:50 +0100 Subject: add documentatioon about time delay --- README.md | 1 + youtube-auto-timestamper.user.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 94b3bff..694f9f4 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ I think Google already does this for you if you have an account, but I don't (an 1. Install Violentmonkey (untested on other userscript managers) 2. Click [here](https://github.com/ewy1/youtube-auto-timestamper/raw/refs/heads/master/youtube-auto-timestamper.user.js) to install this script. +3. _(Optional)_ Change the interval, start delay or time delay. The time delay will get substracted from the timestamp. For example, set this to 60 so your bookmarks will be a minute before your actual watch time, so you don't have to rewind to get a refresher. ## Details diff --git a/youtube-auto-timestamper.user.js b/youtube-auto-timestamper.user.js index 105cb08..ec384cb 100644 --- a/youtube-auto-timestamper.user.js +++ b/youtube-auto-timestamper.user.js @@ -8,12 +8,15 @@ // @description 12/17/2025, 5:12:31 PM // ==/UserScript== -// interval in seconds +// interval in ms const interval = 1000; +// start delay in ms const startDelay = 10000; -const timeRegex = /(([&?])t=[0-9]+)/ +// substracted time in seconds const timeDelay = 0; +const timeRegex = /(([&?])t=[0-9]+)/ + const tick = () => { const ytplayer = document.getElementById("movie_player"); if (!ytplayer) { -- cgit v1.3