Skip to content

Instantly share code, notes, and snippets.

View ALifeLivedFully's full-sized avatar
🥰
Thinking about tech.

Dani ALifeLivedFully

🥰
Thinking about tech.
View GitHub Profile
@ALifeLivedFully
ALifeLivedFully / YouTube - Timestamps.js
Last active December 6, 2025 02:01
A modified version of another template with the added functions of allowing longer timestamps, and allowing youtube short links (Like so: https://youtu.be/dQw4w9WgXcQ) credit to https://github.com/torantine for the original timestamp script & https://github.com/duckpuppy for allowing longer timestamps. The original script discussion can be found…
<%*
// define function to replace timestamps in file
async function replaceTimestamp () {
const regexHHMM = /YT=((\d+):([0-5]\d))/g;
// change "YT=" if you want a different search term. currently videos cannot be longer than 99m59s
var content = tp.file.content; // *content of file*
var matches = content.matchAll(regexHHMM); // *find all regex matches in file*
for(let match of matches){
content = content.replace(
match[0],

Keybase proof

I hereby claim:

  • I am alifelivedfully on github.
  • I am alifelivedfully (https://keybase.io/alifelivedfully) on keybase.
  • I have a public key ASCPMHZdqrGM9t1UpTbUQHm2OsPIqlLNTk-0Gk2CdxiAhgo

To claim this, I am signing this object: