Skip to content

Commit

Permalink
Merge pull request #108 from makermelissa/splitfix
Browse files Browse the repository at this point in the history
Remove duplicate code
  • Loading branch information
makermelissa committed Jun 10, 2023
2 parents a3bef74 + cc8bfed commit af981ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 2 additions & 0 deletions js/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ function refitTerminal() {
});
}

// Fix the viewport height for mobile devices by setting
// the --vh css variable to 1% of the window inner height
function fixViewportHeight() {
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
Expand Down
10 changes: 0 additions & 10 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,16 +367,6 @@ function updateUIConnected(isConnected) {
}
}

// Fix the viewport height for mobile devices by setting
// the --vh css variable to 1% of the window inner height
function fixViewportHeight() {
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
}

fixViewportHeight();
window.addEventListener("resize", fixViewportHeight);

window.onbeforeunload = () => {
if (isDirty()) {
return "You have unsaved changed, exit anyways?";
Expand Down

0 comments on commit af981ce

Please sign in to comment.