add toggleTheaterMode :3

This commit is contained in:
ashley 2024-05-13 16:04:04 +00:00
parent 54da43668d
commit 06a9e61330

View file

@ -1075,7 +1075,7 @@ Privacy
</label>
<a onclick="if(document.querySelector('.watch-page').style.display === 'grid') {document.querySelector('.watch-page').style.display = 'flex'} else {document.querySelector('.watch-page').style.display = 'grid'}" class="theather"><i class="fa-sharp fa-light fa-up-right-and-down-left-from-center"></i> Theater</a>
<a onclick="toggleTheaterMode()"" class="theather"><i class="fa-sharp fa-light fa-up-right-and-down-left-from-center"></i> Theater</a>
<% if (inv.comments) { %>
<input type="checkbox" class="hj" id="j" style="display:none">
@ -1785,7 +1785,7 @@ Recommended Videos
history.replaceState(null, '', newUrl);
}
}
<% if (Array.isArray(inv_vid.recommendedVideos) && inv_vid.recommendedVideos.length > 1) { %>
let checkbox = document.getElementById("continue");
@ -1859,6 +1859,22 @@ if (/[?&]autoplay=/.test(location.search)) {
</script>
<script>
function toggleTheaterMode() {
var videoPlayerContainer = document.querySelector('.video-player-container');
if (videoPlayerContainer.classList.contains('theatermodeon')) {
videoPlayerContainer.classList.remove('theatermodeon');
} else {
videoPlayerContainer.classList.add('theatermodeon');
}
var watchPage = document.querySelector('.watch-page');
if (watchPage.style.display === 'grid') {
watchPage.style.display = 'flex';
} else {
watchPage.style.display = 'grid';
}
}
const languageCode = localStorage.getItem("Language");
const regionCode = localStorage.getItem("Region");
const currentURL = location.href;