From 09ebc6ec6338545bdd694dc6eee57f2e9d2b8075 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 8 Feb 2025 18:01:26 +0100 Subject: [PATCH 1/3] UI - Fix mute/unmute alt/title label alt/title text in watch overview (#2951) --- changedetectionio/templates/watch-overview.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index d6632cbed5c..3cdaaf5b7e5 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -108,7 +108,8 @@ {% else %} UnPause checks {% endif %} - Mute notifications + {% set mute_label = 'UnMute notification' if watch.notification_muted else 'Mute notification' %} + {{ mute_label }} {{watch.title if watch.title is not none and watch.title|length > 0 else watch.url}} From 6b99afe0f79c76aa2bec4406eeecab5bb1531bc5 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 10 Feb 2025 00:35:39 +0100 Subject: [PATCH 2/3] Adding `browser_steps` JSON Schema rule for API updates (#2957) --- changedetectionio/api/api_schema.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/changedetectionio/api/api_schema.py b/changedetectionio/api/api_schema.py index 379f7045b67..2f9dcabadce 100644 --- a/changedetectionio/api/api_schema.py +++ b/changedetectionio/api/api_schema.py @@ -112,6 +112,35 @@ def build_watch_json_schema(d): schema['properties']['time_between_check'] = build_time_between_check_json_schema() + schema['properties']['browser_steps'] = { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "operation": { + "type": ["string", "null"], + "maxLength": 5000 # Allows null and any string up to 5000 chars (including "") + }, + "selector": { + "type": ["string", "null"], + "maxLength": 5000 + }, + "optional_value": { + "type": ["string", "null"], + "maxLength": 5000 + } + }, + "required": ["operation", "selector", "optional_value"], + "additionalProperties": False # No extra keys allowed + } + }, + {"type": "null"}, # Allows null for `browser_steps` + {"type": "array", "maxItems": 0} # Allows empty array [] + ] + } + # headers ? return schema From e83fb37fb69124b6d3fbe664bc6242ae6d1a9e26 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 10 Feb 2025 00:36:35 +0100 Subject: [PATCH 3/3] UI - "Browser Steps" tab should be always available with helpful info (evenwhen playwright is not configured) (#2955) --- changedetectionio/templates/edit.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index f970e608c98..3b3dbbe267e 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -45,9 +45,8 @@ {% if extra_tab_content %}
  • {{ extra_tab_content }}
  • {% endif %} - {% if playwright_enabled %}
  • Browser Steps
  • - {% endif %} + {% if watch['processor'] == 'text_json_diff' %}
  • Visual Filter Selector
  • Filters & Triggers
  • @@ -199,8 +198,9 @@ - {% if playwright_enabled %} +
    + {% if playwright_enabled %}
    @@ -240,8 +240,16 @@

    Click here to Start

    + {% else %} + +

    Sorry, this functionality only works with Playwright/Chrome enabled watches.

    +

    Enable the Playwright Chrome fetcher, or alternatively try our very affordable subscription based service.

    +

    This is because Selenium/WebDriver can not extract full page screenshots reliably.

    +

    You may need to Enable playwright environment variable and uncomment the sockpuppetbrowser from the docker-compose.yml file.

    +
    + {% endif %} - {% endif %} +
    @@ -493,6 +501,7 @@

    Text filtering

    Sorry, this functionality only works with Playwright/Chrome enabled watches.

    Enable the Playwright Chrome fetcher, or alternatively try our very affordable subscription based service.

    This is because Selenium/WebDriver can not extract full page screenshots reliably.

    +

    You may need to Enable playwright environment variable and uncomment the sockpuppetbrowser from the docker-compose.yml file.

    {% endif %}