From e0138230f2bdeb5a1c0e47b8c7adca4767e47b58 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Tue, 31 Aug 2021 11:47:28 +0100 Subject: [PATCH] Added warning for dynamic content when image manipulation is on Former-commit-id: efbacd820723ce40542ce0d57d1431443e6f555c [formerly daea0d11f6e370632b824ae364237173d99da052 [formerly ad4df05cdb68810f6773df3d004e33c8dd49e8dc]] Former-commit-id: 773c8507c715ecd4e17ed902ff8bd93db2162486 Former-commit-id: d6ca3fb4c3a91bea2494a16850921a99934b2233 --- www/index.html | 13 ++++--------- www/js/app.js | 3 ++- www/js/lib/uiUtil.js | 16 +++++++++++++--- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/www/index.html b/www/index.html index a9f09dda..d063af52 100644 --- a/www/index.html +++ b/www/index.html @@ -118,18 +118,13 @@

Changes in version 1.0

Full changelog...

@@ -754,7 +749,7 @@ Display images if any (if hidden, tap the  blue area  to display one-by-one)
-
+
'; + if (params.contentInjectionMode === 'serviceworker' && params.manipulateImages) { + alertHTML = + '
' + + '×' + + 'Active content may be disrupted: To use Archive Index type a space in the box above, and you may need to ' + + 'disable Image manipulation.' + + ' [Permanently hide]' + + '
'; + } var alertBoxHeader = document.getElementById('alertBoxHeader'); alertBoxHeader.innerHTML = alertHTML; alertBoxHeader.style.display = 'block'; - ['swModeLink', 'stop'].forEach(function(id) { + ['swModeLink', 'imModeLink', 'stop'].forEach(function(id) { // Define event listeners for both hyperlinks in alert box: these take the user to the Config tab and highlight // the options that the user needs to select - document.getElementById(id).addEventListener('click', function () { - var elementID = id === 'stop' ? 'hideActiveContentWarningCheck' : 'serviceworkerModeRadio'; + var modeLink = document.getElementById(id); + if (modeLink) modeLink.addEventListener('click', function () { + var elementID = id === 'stop' ? 'hideActiveContentWarningCheck' : id === 'swModeLink' ? 'serviceworkerModeRadio' : 'manipulateImagesCheck'; var thisLabel = document.getElementById(elementID).parentNode; thisLabel.style.borderColor = 'red'; thisLabel.style.borderStyle = 'solid';