diff --git a/changedetectionio/api/api_schema.py b/changedetectionio/api/api_schema.py index 379f7045b..2f9dcabad 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 diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index 6ffe2a44a..3052fca76 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -78,9 +78,7 @@ {% if extra_tab_content %}
  • {{ extra_tab_content }}
  • {% endif %} - {% if playwright_enabled %}
  • Browser Steps
  • - {% endif %} {% if watch['processor'] == 'text_json_diff' %}
  • Visual Filter Selector
  • @@ -234,8 +232,9 @@ Math: {{ 1 + 1 }}") }} - {% if playwright_enabled %} +
    + {% if playwright_enabled %}
    @@ -275,8 +274,16 @@ Math: {{ 1 + 1 }}") }}
    + {% 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 %} +
    @@ -558,6 +565,7 @@ keyword") }}

    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 %}
    diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index d6632cbed..3cdaaf5b7 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}}