diff --git a/src/auto_archiver/formatters/templates/html_template.html b/src/auto_archiver/formatters/templates/html_template.html index 13ec15a..8bdf5ef 100644 --- a/src/auto_archiver/formatters/templates/html_template.html +++ b/src/auto_archiver/formatters/templates/html_template.html @@ -286,11 +286,11 @@ // logic for enabled/disabled greyscale // Get references to the checkboxes and images/videos const safeImageViewCheckbox = document.getElementById('safe-media-view'); - const imagesVideos = document.querySelectorAll('img, video'); + const visualPreviews = document.querySelectorAll('img, video,embed'); // Function to toggle grayscale effect function toggleGrayscale() { - imagesVideos.forEach(element => { + visualPreviews.forEach(element => { if (safeImageViewCheckbox.checked) { // Enable grayscale effect element.style.filter = 'grayscale(1)'; @@ -307,7 +307,7 @@ safeImageViewCheckbox.addEventListener('change', toggleGrayscale); // Handle the hover effect using JavaScript - imagesVideos.forEach(element => { + visualPreviews.forEach(element => { element.addEventListener('mouseenter', () => { // Disable grayscale effect on hover element.style.filter = 'none'; diff --git a/src/auto_archiver/formatters/templates/macros.html b/src/auto_archiver/formatters/templates/macros.html index c2281c2..1373b43 100644 --- a/src/auto_archiver/formatters/templates/macros.html +++ b/src/auto_archiver/formatters/templates/macros.html @@ -32,6 +32,10 @@ No URL available for {{ m.key }}. Your browser does not support the video element. +{% elif 'application/pdf' in m.mimetype %} +