mirror of
https://github.com/codeninjasuk/dojo.git
synced 2024-11-22 07:27:50 -05:00
23 lines
647 B
JavaScript
23 lines
647 B
JavaScript
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();
|
|
abc = window.open(ele.dataset.href,'_blank',`height=${screen.height},width=${screen.width}`);
|
|
setTimeout(()=>{
|
|
abc.location.reload();
|
|
},2000)
|
|
})
|
|
})
|
|
|