diff --git a/changedetectionio/res/xpath_element_scraper.js b/changedetectionio/res/xpath_element_scraper.js index 193453c7..db76652b 100644 --- a/changedetectionio/res/xpath_element_scraper.js +++ b/changedetectionio/res/xpath_element_scraper.js @@ -81,6 +81,14 @@ var bbox; for (var i = 0; i < elements.length; i++) { bbox = elements[i].getBoundingClientRect(); + // Exclude items that are not interactable or visible + if(elements[i].style.opacity === "0") { + continue + } + if(elements[i].style.display === "none" || elements[i].style.pointerEvents === "none" ) { + continue + } + // Forget really small ones if (bbox['width'] < 10 && bbox['height'] < 10) { continue;