MarseyWorld/files/assets/js/submission_listing.js

28 lines
810 B
JavaScript
Raw Normal View History

2022-07-16 21:00:02 +00:00
function expandText(id) {
document.getElementById('post-text-'+id).classList.toggle('d-none');
for (const e of document.getElementsByClassName('text-expand-icon-'+id))
{
e.classList.toggle('fa-expand-alt');
e.classList.toggle('fa-compress-alt');
}
};
function togglevideo(pid) {
const e = this.event
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
return true;
e.preventDefault();
let vid = document.getElementById(`video-${pid}`).classList
vid.toggle('d-none')
let vid2 = document.getElementById(`video2-${pid}`)
if (vid.contains('d-none')) vid2.pause()
else vid2.play()
}
function toggleyoutube(pid) {
const e = this.event
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
return true;
e.preventDefault();
document.getElementById(`video-${pid}`).classList.toggle('d-none')
}