dojo/js/fullscreen.js

24 lines
647 B
JavaScript
Raw Normal View History

2023-10-12 07:46:57 -04:00
function openFullscreen() {
elem = document.body;
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.webkitRequestFullscreen) { /* Safari */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE11 */
elem.msRequestFullscreen();
}
}
Array.from(document.querySelectorAll('.option>button')).forEach((ele)=>{
ele.addEventListener('click',()=>{
// openFullscreen();
2023-10-13 05:22:19 -04:00
abc = window.open(ele.dataset.href,'_blank',`height=${screen.height},width=${screen.width}`);
setTimeout(()=>{
abc.location.reload();
},2000)
2023-10-12 07:46:57 -04:00
})
})