Skip to content

Instantly share code, notes, and snippets.

@Raphango
Raphango / playlist_time.js
Last active July 22, 2020 21:49 — forked from fredericogg/playlist_time.js
Calcula o tempo total de uma playlist no Youtube. É só colar no console na página da playlist. Fiz esse script porque não achei o tempo total da playlist 😅.
(function() {
var timeSeconds = 0;
var timestampDivList = document.querySelectorAll(".timestamp");
var nomePlaylist = document.getElementsByClassName("pl-header-title")[0].textContent.replace(new RegExp("\n * ", 'g')," ")
for(var i = 0; i < timestampDivList.length; i++) {
var timestampDiv = timestampDivList[i];