Skip to content

Instantly share code, notes, and snippets.

View ronaldscruz's full-sized avatar
💡
w/ some fresh opensource ideas

Ronald Cruz ronaldscruz

💡
w/ some fresh opensource ideas
  • Afya Education
  • São Paulo, Brasil
View GitHub Profile
@cesarhilario
cesarhilario / playlist_time.js
Last active November 21, 2023 14:31 — forked from fredericogg/playlist_time.js
Calcula o tempo total de uma playlist no Youtube. É só colar no console na página da playlist. Update para a nova interface do Youtube
(function () {
const timeContainer = document.querySelectorAll(
".ytd-thumbnail-overlay-time-status-renderer"
);
let timeSeconds = 0;
for (let i = 0; i < timeContainer.length; i++) {
const timeStr = timeContainer[i].innerText;
if (!/\d?\d:\d{2}(:\d{2})?/g.test(timeStr)) continue;
const timeParts = timeStr.split(":");