changedetection.io icon indicating copy to clipboard operation
changedetection.io copied to clipboard

[feature] UI - Limit history report to only the changes

Open jamesdeluk opened this issue 3 months ago • 2 comments

Version and OS v0.50.14, Docker, macOS

Is your feature request related to a problem? Please describe. A long page with a couple of small changes makes hunting the changes frustrating. It can auto-scroll, but that doesn't work as well with multiple small changes.

Describe the solution you'd like An option to only show the changes in the History (i.e. only the green/red text)

Describe the use-case and give concrete real-world examples e.g. before:

Image

after:

Image

For anyone else wanting this, "I" smashed out a quick userscript, although build-in functionality would be nicer:

(function() {
    'use strict';
    function hideNonChangeText() {
        // Find the target element (adjust selector as needed)
        const resultElement = document.getElementById('result');
        if (!resultElement) return;
        // Iterate through child nodes
        resultElement.childNodes.forEach(node => {
            // Check if it's a text node (nodeType === 3)
            if (node.nodeType === Node.TEXT_NODE) {
                const text = node.nodeValue.trim();
                // If text exists, hide it by wrapping in a hidden span
                if (text) {
                    const hiddenSpan = document.createElement('span');
                    hiddenSpan.style.display = 'none';
                    hiddenSpan.textContent = node.nodeValue;
                    node.parentNode.replaceChild(hiddenSpan, node);
                }
            }
        });
    }
    // Run immediately
    hideNonChangeText();
    // Also observe for dynamic changes
    const observer = new MutationObserver(hideNonChangeText);
    observer.observe(document.body, { childList: true, subtree: true });
})();

jamesdeluk avatar Oct 02 '25 05:10 jamesdeluk

nice idea!

dgtlmoon avatar Oct 02 '25 08:10 dgtlmoon

in #3442 i'm changing the history page to use the same code as the difference/history generator for the notifications (HTML server side), so it means I should be able to turn on/off "include_equal=True"

dgtlmoon avatar Oct 03 '25 07:10 dgtlmoon