-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Window Controls Overlay to hide the title bar
- Loading branch information
1 parent
fc63419
commit 4f8361f
Showing
5 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +0,0 @@ | ||
// When running as standalone (PWA), clear the document title using an invisible (zero-width) control character | ||
function clearTitle(mql) { | ||
if (mql.matches) document.title = '\u200E'; | ||
} | ||
|
||
const mql = window.matchMedia('(display-mode: standalone)'); | ||
clearTitle(mql); | ||
mql.addEventListener('change', (e) => clearTitle(e)); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
body { | ||
background: black; | ||
color: black; | ||
} | ||
|
||
/* The "title bar" div that is used to drag the window around. */ | ||
.empty-title-bar { | ||
position: fixed; | ||
-webkit-app-region: drag; | ||
app-region: drag; | ||
|
||
left: env(titlebar-area-x, 0); | ||
top: env(titlebar-area-y, 0); | ||
width: env(titlebar-area-width, 100%); | ||
height: env(titlebar-area-height, 33px); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters