Skip to content

Commit 8a8cc41

Browse files
committed
Better scrollbar visibility
Signed-off-by: Ovenoboyo <ovenoboyo@gmail.com>
1 parent 7420a08 commit 8a8cc41

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

assets/css/index.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ a:hover {
3737
.main {
3838
min-height: 100vh;
3939
display: block;
40-
color: white !important;
4140
}
4241

4342
.nav__bar {

assets/js/domUtils.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,23 @@ export function setupPageFunctionality () {
2020
}
2121
}
2222

23+
let mouseMoveScrollEnabled = false
24+
document.onmousemove = (e) => {
25+
if (e.clientX >= document.body.clientWidth - scrollBarWidth) {
26+
enableScrolling(false)
27+
mouseMoveScrollEnabled = true
28+
} else {
29+
if (mouseMoveScrollEnabled) {
30+
enableScrolling(true)
31+
mouseMoveScrollEnabled = false
32+
}
33+
}
34+
}
35+
2336
document.onmouseup = enableScrolling
2437

38+
39+
2540
const music = document.getElementById('music');
2641
if (music) {
2742
music.volume = 0.2;

0 commit comments

Comments
 (0)