Skip to content

Commit dc3e6c5

Browse files
committed
fix: add click listeners to arrow icons for mouse control
1 parent 4f9e0ab commit dc3e6c5

4 files changed

Lines changed: 18 additions & 3 deletions

File tree

web/assets/script.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ window.addEventListener('message', (e) => {
142142
}
143143
})
144144

145+
// Setup left and right click handlers
146+
const leftArrow = document.getElementById('tip-left-arrow')
147+
const rightArrow = document.getElementById('tip-right-arrow')
148+
149+
leftArrow.addEventListener('click', showPrevTip)
150+
rightArrow.addEventListener('click', showNextTip)
151+
145152
if (ENABLE_CURSOR) {
146153
const cursor = document.getElementById('cursor')
147154

web/assets/styles.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,11 @@ a[onclick] {
157157
animation: spinner 1s linear infinite;
158158
}
159159

160+
.arrow-control {
161+
user-select: none;
162+
}
163+
164+
.arrow-control:hover {
165+
cursor: pointer;
166+
}
167+

web/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const LOADSCREEN_TIPS = [
2323
},
2424
{
2525
title: 'Markdown Render',
26-
content: '**This is bold**. But this is not. [This is a link!](https://github.com/project-error/pe-basicloadscreen/#)'
26+
content: '**This is bold**. But this is not. [This is a link!](https://github.com/project-error/pe-basicloading)'
2727
}
2828
];
2929

web/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
</div>
2626
<div class="tip-text" id="tip-content"></div>
2727
<div class="hint-help-wrapper">
28-
<span class="material-icons-outlined md-light md-24">
28+
<span class="material-icons-outlined md-light md-24 arrow-control" id="tip-left-arrow">
2929
chevron_left
3030
</span>
3131
<span class="hint-help-text" id="hint-help-text"></span>
32-
<span class="material-icons-outlined md-light md-24">
32+
<span class="material-icons-outlined md-light md-24 arrow-control" id="tip-right-arrow">
3333
chevron_right
3434
</span>
3535
</div>

0 commit comments

Comments
 (0)