diff --git a/changedetectionio/content_fetcher.py b/changedetectionio/content_fetcher.py index f547ce24..f6a4a154 100644 --- a/changedetectionio/content_fetcher.py +++ b/changedetectionio/content_fetcher.py @@ -84,7 +84,10 @@ class Fetcher(): // default back to the less intelligent one if (!xpath_result) { xpath_result = getXPath(elements[i]); - } + } + if(window.getComputedStyle(elements[i]).visibility === "hidden") { + continue; + } size_pos.push({ xpath: xpath_result, diff --git a/changedetectionio/static/js/visual-selector.js b/changedetectionio/static/js/visual-selector.js index 81721131..faa532f0 100644 --- a/changedetectionio/static/js/visual-selector.js +++ b/changedetectionio/static/js/visual-selector.js @@ -137,7 +137,7 @@ $(document).ready(function() { } var sel = selector_data[current_selected_i]; - $("#css_filter").val(sel.xpath); + $("#css_filter").val('xpath:'+sel.xpath); xctx.fillStyle = 'rgba(225,225,225,0.8)'; xctx.fillRect(0,0,c.width, c.height); xctx.clearRect(sel.left * x_scale, sel.top * y_scale, sel.width * x_scale, sel.height * y_scale);