Skip to content

Instantly share code, notes, and snippets.

@unrevised6419
Created November 25, 2025 00:24
Show Gist options
  • Select an option

  • Save unrevised6419/4c85b9ab82b09b04f2f2371fc9a3b7d9 to your computer and use it in GitHub Desktop.

Select an option

Save unrevised6419/4c85b9ab82b09b04f2f2371fc9a3b7d9 to your computer and use it in GitHub Desktop.
youtube queue total time
[...$0.children]
.map(el => el.querySelector('.thumbnail-overlay-badge-shape.ytd-thumbnail-overlay-time-status-renderer').textContent)
.map(time => time.split(':').reverse())
.map(([s = '0' , m = '0', h = '0']) => Number(s) + (Number(m) * 60) + (Number(h) * 3600))
.reduce((a, c) => a + c, 0)/3600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment