diff options
| -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) { |
