add touch events

This commit is contained in:
vance 2024-05-02 21:16:10 -07:00
parent 075b4e1140
commit 4acb6e701c

View File

@ -136,10 +136,12 @@
};
// bonzi cursor
window.addEventListener('mousemove', (event) => {
['mousemove', 'touchstart', 'touchmove'].forEach(type => {
window.addEventListener(type, event => {
document.getElementById('cursor').style.top = event.clientY + 'px';
document.getElementById('cursor').style.left = event.clientX + 'px';
});
});
// remove stream if embedded
if (window.self !== window.top) {