scroll vol
This commit is contained in:
parent
54d1d847c2
commit
15086d7d4d
@ -27,6 +27,7 @@
|
||||
position: fixed;
|
||||
user-select: none;
|
||||
color: gray;
|
||||
text-shadow: 1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black;
|
||||
}
|
||||
.mousie_pointer {
|
||||
font-family: "Noto Sans Symbols 2";
|
||||
@ -48,8 +49,8 @@
|
||||
<div id="mousie_layer">
|
||||
<template id="mousie_template">
|
||||
<div class="mousie">
|
||||
<div class="mousie_talk"></div>
|
||||
<div class="mousie_pointer">🮰</div>
|
||||
<div class="mousie_talk"></div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@ -141,6 +142,7 @@
|
||||
ws.onclose = () => {
|
||||
setTimeout(createWs, 5000);
|
||||
playlist = undefined;
|
||||
[...document.getElementsByClassName('mousie')].forEach(m => m.remove());
|
||||
};
|
||||
})();
|
||||
|
||||
@ -175,8 +177,10 @@
|
||||
}
|
||||
|
||||
onkeypress = evt => {
|
||||
if (evt.key == "Enter") {
|
||||
if (evt.key == "Escape") {
|
||||
var txt = "";
|
||||
} else if (evt.key == "Enter") {
|
||||
var txt = '\n';
|
||||
} else {
|
||||
var txt = evt.key;
|
||||
}
|
||||
@ -185,7 +189,7 @@
|
||||
};
|
||||
|
||||
onkeydown = evt => {
|
||||
if (["Backspace", "Delete"].includes(evt.key)) onkeypress(evt);
|
||||
if (["Backspace", "Delete", "Escape"].includes(evt.key)) onkeypress(evt);
|
||||
};
|
||||
|
||||
document.documentElement.onpaste = evt => {
|
||||
@ -208,6 +212,14 @@
|
||||
sync(true);
|
||||
};
|
||||
|
||||
onwheel = evt => {
|
||||
if (evt.deltaY > 0) {
|
||||
videoplayer.volume = videoplayer.volume + 0.1 > 1 ? 1 : videoplayer.volume + 0.1;
|
||||
} else if (evt.deltaY < 0) {
|
||||
videoplayer.volume = videoplayer.volume - 0.1 < 0 ? 0 : videoplayer.volume - 0.1;
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user