Skip to content

Commit

Permalink
fix: fix fullscreen button
Browse files Browse the repository at this point in the history
  • Loading branch information
goshander committed Sep 21, 2023
1 parent ee76b3f commit f87da16
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/post-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ const SCRIPT_FIX = `
if(sessionStorage.fullScreen === 'true'){
document.querySelector('.dl-header').style.display = 'none'
}
document.querySelector('.dc-controls.dc-controls_vertical button:first-child').addEventListener('click',()=>{
const header = document.querySelector('.dl-header')
header.style.display = sessionStorage.fullScreen === 'true' ? '' : 'none';
})
const fullScreenButton = document.querySelector('.dc-controls.dc-controls_vertical button:first-child')
if(fullScreenButton){
fullScreenButton.addEventListener('click',()=>{
const header = document.querySelector('.dl-header')
header.style.display = sessionStorage.fullScreen === 'true' ? '' : 'none';
})
}
`

async function main() {
Expand Down

0 comments on commit f87da16

Please sign in to comment.