aboutsummaryrefslogtreecommitdiff
path: root/static/js/autoplay.ts
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-11-22 15:06:15 -0500
committertdro <tdro@noreply.example.com>2023-11-22 15:06:15 -0500
commit35f491efb88c9e35e87b719a9e8b1be90c3c5918 (patch)
tree434e039282d384bf308a9393f7bd1b2d6c38d268 /static/js/autoplay.ts
parent9a38bf790011a771a753ef6e01bf7c2b5d5635c8 (diff)
downloadcanory-35f491efb88c9e35e87b719a9e8b1be90c3c5918.tar.gz
canory-35f491efb88c9e35e87b719a9e8b1be90c3c5918.tar.bz2
canory-35f491efb88c9e35e87b719a9e8b1be90c3c5918.zip
static/js: Ensure correct width and height references
Diffstat (limited to 'static/js/autoplay.ts')
-rw-r--r--static/js/autoplay.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/static/js/autoplay.ts b/static/js/autoplay.ts
index efa55e9..70f372a 100644
--- a/static/js/autoplay.ts
+++ b/static/js/autoplay.ts
@@ -6,8 +6,8 @@
const view = element.getBoundingClientRect();
return view.top >= -options.offset.top
&& view.left >= -options.offset.left
- && view.bottom <= (window.innerHeight || self.documentElement.clientHeight) + options.offset.bottom
- && view.right <= (window.innerWidth || self.documentElement.clientWidth) + options.offset.right;
+ && view.bottom <= (self.innerHeight || document.documentElement.clientHeight) + options.offset.bottom
+ && view.right <= (self.innerWidth || document.documentElement.clientWidth) + options.offset.right;
};
["scroll", "DOMContentLoaded"].forEach(function (event) {