hubmc-web/js/utils.js

23 lines
434 B
JavaScript
Raw Normal View History

2024-09-29 22:43:23 +02:00
// Returns the mouse position
const getMousePos = e => {
return {
x : e.clientX,
y : e.clientY
};
};
// Returns the window width and height
const getWinSize = () => {
return {
width: window.innerWidth,
height: window.innerHeight
};
};
const isFirefox = () => navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
export {
getMousePos,
getWinSize,
isFirefox,
};