This commit is contained in:
Christian Anetzberger
2022-01-29 20:48:35 +01:00
commit 01907eb338
144 changed files with 11275 additions and 0 deletions

24
components/utils.jsx Normal file
View File

@@ -0,0 +1,24 @@
export function getWidth() {
if (typeof window != "undefined") {
return Math.max(
document.body.scrollWidth,
document.documentElement.scrollWidth,
document.body.offsetWidth,
document.documentElement.offsetWidth,
document.documentElement.clientWidth
);
}
return 0;
}
export function getHeight() {
if (typeof window != "undefined") {
return Math.max(
document.body.scrollHeight,
document.documentElement.scrollHeight,
document.body.offsetHeight,
document.documentElement.offsetHeight,
document.documentElement.clientHeight
);
}
}