14 lines
551 B
JavaScript
14 lines
551 B
JavaScript
|
let players = {}
|
||
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||
|
let headers = dgtn(`h2`);
|
||
|
Object.values(headers).forEach((header) => {
|
||
|
header.innerHTML += `<a class='post-nav-link' aria-hidden='true' href='#${header.id}'>#</a>`;
|
||
|
});
|
||
|
players = Array.from(dgcn('plyr')).map(p => new Plyr(p, {
|
||
|
iconUrl: '/assets/plyr/plyr.svg',
|
||
|
controls: ['play-large', 'play', 'current-time', 'progress', 'download', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen'],
|
||
|
quality: {
|
||
|
default: p.dataset.default
|
||
|
}
|
||
|
}));
|
||
|
});
|