X-Git-Url: https://git.jacobcasper.com/?p=hnim.git;a=blobdiff_plain;f=hnim.js;h=7ac3f5d9ee704cdbee50f6829def5178fb51eb23;hp=aab3bc05c913bf797933639202210d15f2e95db9;hb=e10798def56ccc77315816ca54e32e623cf49dd5;hpb=946d788c814c425f2a2ccbc715d0d4d1ca3e2614 diff --git a/hnim.js b/hnim.js index aab3bc0..7ac3f5d 100644 --- a/hnim.js +++ b/hnim.js @@ -15,7 +15,7 @@ const visible = (element) => { let bounds = element.getBoundingClientRect(); - return Math.abs(bounds.bottom - bounds.top) > window.innerHeight || bounds.top >= 0 && bounds.bottom <= window.innerHeight; + return Math.abs(bounds.bottom - bounds.top) > window.innerHeight || (bounds.top >= 0 && bounds.bottom <= window.innerHeight); } const changeWithVisibleCallback = (comment, callback) => {