From 71a46130b473f63c1dcbfd7bc3f0de51fa812436 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 14 Feb 2024 10:31:57 +0100 Subject: [PATCH] add handy comment --- changedetectionio/content_fetchers/res/stock-not-in-stock.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changedetectionio/content_fetchers/res/stock-not-in-stock.js b/changedetectionio/content_fetchers/res/stock-not-in-stock.js index 0c3327ba..f087c11e 100644 --- a/changedetectionio/content_fetchers/res/stock-not-in-stock.js +++ b/changedetectionio/content_fetchers/res/stock-not-in-stock.js @@ -136,6 +136,7 @@ function isItemInStock() { const element = elementsToScan[i]; // outside the 'fold' or some weird text in the heading area + // .getBoundingClientRect() was causing a crash in chrome 119, can only be run on contentVisibility != hidden if (element.getBoundingClientRect().top + window.scrollY >= vh || element.getBoundingClientRect().top + window.scrollY <= 100) { continue } @@ -160,7 +161,7 @@ function isItemInStock() { for (let i = elementsToScan.length - 1; i >= 0; i--) { const element = elementsToScan[i]; // outside the 'fold' or some weird text in the heading area - + // .getBoundingClientRect() was causing a crash in chrome 119, can only be run on contentVisibility != hidden if (element.getBoundingClientRect().top + window.scrollY >= vh || element.getBoundingClientRect().top + window.scrollY <= 100) { continue }