diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index bcc39fdd..e3833976 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -38,7 +38,7 @@ from flask_paginate import Pagination, get_page_parameter from changedetectionio import html_tools from changedetectionio.api import api_v1 -__version__ = '0.45.8' +__version__ = '0.45.8.1' from changedetectionio.store import BASE_URL_NOT_SET_TEXT diff --git a/changedetectionio/processors/__init__.py b/changedetectionio/processors/__init__.py index 10c9138c..efccea49 100644 --- a/changedetectionio/processors/__init__.py +++ b/changedetectionio/processors/__init__.py @@ -52,6 +52,11 @@ class difference_detection_processor(): prefer_fetch_backend = 'base_html_playwright' browser_connection_url = connection[0].get('browser_connection_url') + # PDF should be html_requests because playwright will serve it up (so far) in a embedded page + # @todo https://github.com/dgtlmoon/changedetection.io/issues/2019 + # @todo needs test to or a fix + if self.watch.is_pdf: + prefer_fetch_backend = "html_requests" # Grab the right kind of 'fetcher', (playwright, requests, etc) if hasattr(content_fetcher, prefer_fetch_backend): diff --git a/changedetectionio/static/js/vis.js b/changedetectionio/static/js/vis.js index 6a11904f..edcacfb6 100644 --- a/changedetectionio/static/js/vis.js +++ b/changedetectionio/static/js/vis.js @@ -2,21 +2,28 @@ $(document).ready(function () { // Lazy Hide/Show elements mechanism $('[data-visible-for]').hide(); - $(':radio').on('keyup keypress blur change click', function (e) { - $('[data-visible-for]').hide(); - $('.advanced-options').hide(); - var n = $(this).attr('name') + "=" + $(this).val(); + function show_related_elem(e) { + var n = $(e).attr('name') + "=" + $(e).val(); if (n === 'fetch_backend=system') { n = "fetch_backend=" + default_system_fetch_backend; } $(`[data-visible-for~="${n}"]`).show(); - + } + $(':radio').on('keyup keypress blur change click', function (e) { + $(`[data-visible-for]`).hide(); + $('.advanced-options').hide(); + show_related_elem(this); }); - $(':radio:checked').change(); + + $(':radio:checked').each(function (e) { + show_related_elem(this); + }) // Show advanced $('.show-advanced').click(function (e) { - $(this).closest('.tab-pane-inner').find('.advanced-options').toggle(); + $(this).closest('.tab-pane-inner').find('.advanced-options').each(function (e) { + $(this).toggle(); + }) }); }); \ No newline at end of file diff --git a/changedetectionio/static/js/watch-settings.js b/changedetectionio/static/js/watch-settings.js index 25b3f2d2..22bf48ed 100644 --- a/changedetectionio/static/js/watch-settings.js +++ b/changedetectionio/static/js/watch-settings.js @@ -1,18 +1,4 @@ $(document).ready(function () { - - // Lazy Hide/Show elements mechanism - $('[data-visible-for]').hide(); - $(':radio').on('keyup keypress blur change click', function (e){ - $('[data-visible-for]').hide(); - var n = $(this).attr('name') + "=" + $(this).val(); - if (n === 'fetch_backend=system') { - n = "fetch_backend=" + default_system_fetch_backend; - } - $(`[data-visible-for~="${n}"]`).show(); - - }); - $(':radio:checked').change(); - $('#notification-setting-reset-to-default').click(function (e) { $('#notification_title').val(''); $('#notification_body').val(''); diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index ff3769ab..103f57af 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -127,7 +127,7 @@ {% endif %} -