diff options
| author | Ewy~ <ewy0@protonmail.com> | 2025-12-23 15:38:50 +0100 |
|---|---|---|
| committer | Ewy~ <ewy0@protonmail.com> | 2025-12-23 15:38:50 +0100 |
| commit | 8175ef1cd145d68b987efece442ae244bef892e4 (patch) | |
| tree | 56d97cf1eee9d6feb1f9dfe7fe27196ad9212b49 | |
| parent | 4ab68441b22e71420a1db48e107fe145ca004046 (diff) | |
add documentatioon about time delay
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | youtube-auto-timestamper.user.js | 7 |
2 files changed, 6 insertions, 2 deletions
@@ -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) { |
