more tweaks

This commit is contained in:
dgtlmoon
2022-05-22 22:07:45 +02:00
parent a05f8f2bf2
commit 13aabd48db
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -612,7 +612,7 @@ def changedetection_app(config=None, datastore_o=None):
has_empty_checktime=using_default_check_time,
using_global_webdriver_wait=default['webdriver_delay'] is None,
current_base_url=datastore.data['settings']['application']['base_url'],
emailprefix=os.getenv('NOTIFICATION_MAIL_BUTTON_PREFIX', False)
emailprefix=os.getenv('NOTIFICATION_MAIL_BUTTON_PREFIX', False),
)
return output
+3 -3
View File
@@ -47,7 +47,7 @@ class Fetcher():
if('' !==r.id) {
chained_css.unshift("#"+r.id);
final_selector= chained_css.join('>');
# be sure theres only one
// Be sure theres only one, some sites have multiples of the same ID tag :-(
if (window.document.querySelectorAll(final_selector).length ==1 ) {
return final_selector;
}
@@ -63,7 +63,7 @@ class Fetcher():
// @todo - if it's SVG or IMG, go into image diff mode
var elements = window.document.querySelectorAll("div,span,form,table,tbody,tr,td,a,p,ul,li,h1,h2,h3,h4");
var elements = window.document.querySelectorAll("div,span,form,table,tbody,tr,td,a,p,ul,li,h1,h2,h3,h4, header, footer, section, article, aside, details, main, nav, section, summary");
var size_pos=[];
// after page fetch, inject this JS
// build a map of all elements and their positions (maybe that only include text?)
@@ -72,7 +72,7 @@ class Fetcher():
bbox = elements[i].getBoundingClientRect();
// forget really small ones
if (bbox['width'] <10 && bbox['height'] <10 ) {
if (bbox['width'] <20 && bbox['height'] < 20 ) {
continue;
}