diff --git a/changedetectionio/res/xpath_element_scraper.js b/changedetectionio/res/xpath_element_scraper.js index e363d2a1..27a54c2c 100644 --- a/changedetectionio/res/xpath_element_scraper.js +++ b/changedetectionio/res/xpath_element_scraper.js @@ -8,8 +8,15 @@ // Some pages like https://www.londonstockexchange.com/stock/NCCL/ncondezi-energy-limited/analysis // will automatically force a scroll somewhere, so include the position offset // Lets hope the position doesnt change while we iterate the bbox's, but this is better than nothing +var scroll_y = 0; +try { + scroll_y = +document.documentElement.scrollTop || document.body.scrollTop +} catch (e) { + console.log(e); +} + + -var scroll_y=+document.documentElement.scrollTop || document.body.scrollTop // Include the getXpath script directly, easier than fetching function getxpath(e) {