From f9f6300a705ca6d5e0661b1c978a51d1e9ee1147 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 11 Oct 2023 16:46:54 +0200 Subject: [PATCH] UI - Difference page - added 'title' to each change for nice mouse-over information about when the change occured --- changedetectionio/static/js/diff-render.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/changedetectionio/static/js/diff-render.js b/changedetectionio/static/js/diff-render.js index e96680ec..fd2078f0 100644 --- a/changedetectionio/static/js/diff-render.js +++ b/changedetectionio/static/js/diff-render.js @@ -43,6 +43,21 @@ $(document).ready(function () { // Jump at start inputs.current = 0; + + // For nice mouse-over hover/title information + const removed_current_option = $('#diff-version option:selected') + if (removed_current_option) { + $('del').each(function () { + $(this).prop('title', 'Removed '+removed_current_option[0].label); + }); + } + const inserted_current_option = $('#current-version option:selected') + if (removed_current_option) { + $('ins').each(function () { + $(this).prop('title', 'Inserted '+inserted_current_option[0].label); + }); + } + next_diff(); }