Youtube Playlist Duration Calculator

Calculate the duration of a playlist and display it next to the number of videos

< Σχολιασμός για τον κώδικα Youtube Playlist Duration Calculator

Αναφορά: Καλός - ο κώδικας λειτουργεί

§
Δημοσιεύτηκε: 06/09/2020

Thanks for the script! One small note though, unless you really care about extreme backward compatibility I don't see a reason to use jQuery. The only line you're using it for is to insert the time element via a query selector, which can be expressed with vanilla JS just as fine:

document.querySelector("#stats yt-formatted-string:first-child").after(newStat);

DenverCoder1Δημιουργός
§
Δημοσιεύτηκε: 15/09/2020

Hi, thanks for the comment! I completely agree with you. The reason I used jQuery when writing the script was because YouTube's website already has it loaded so I didn't see any reason not to keep it. The require is probably not necessary though, but I probably added it to get rid of a warning. I'll be updating the code since it really doesn't need jQuery at all.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.