diff --git a/MerlinAU.asp b/MerlinAU.asp
index 330551ed..11579a99 100644
--- a/MerlinAU.asp
+++ b/MerlinAU.asp
@@ -857,64 +857,93 @@ function FetchChangelog(startTime)
});
}
+/**------------------------------------------**/
+/** Modified by ExtremeFiretop [2025-May-18] **/
+/**------------------------------------------**/
function ShowLatestChangelog(e)
{
if (e) e.preventDefault();
- let loadingMessage = '
Please wait and allow up to 10 seconds for the changelog to load. ' +
- 'Click on "Cancel" button to stop and exit this dialog.
';
+ const loadingMessage =
+ '
Please wait and allow up to 10 seconds for the changelog to load. ' +
+ 'Click on "Cancel" button to stop and exit this dialog.
';
- if ($('#changelogModal').length)
- {
- $('#changelogData').html(loadingMessage);
- $('#closeChangelogModal').text("Cancel");
- }
- else
- { // Create modal overlay if it doesn't exist //
+ /* ----- build the modal once ----- */
+ if (!$('#changelogModal').length) {
$('body').append(
- '
' +
- '
' +
- '
Latest Changelog
' +
- '' +
- '
' +
+ '
' +
+ '
' +
+ '
Latest Changelog
' +
+ '' +
+ '
' +
loadingMessage +
'
' +
'
' +
'
'
);
- $('#closeChangelogModal').on('click', function(){
+
+ /* close button */
+ $('#closeChangelogModal').on('click', function () {
$('#changelogModal').hide();
});
+
+ /* ---------- NEW: arrow‑key scroll handler (bind once) ---------- */
+ $(document).on('keydown', function (ev) {
+ if (!$('#changelogModal').is(':visible')) return; // ignore if dialog not open
+ const box = $('#changelogContent')[0]; // the scrollable div
+ switch (ev.key) {
+ case 'ArrowDown':
+ box.scrollTop += 40;
+ ev.preventDefault();
+ break;
+ case 'ArrowUp':
+ box.scrollTop -= 40;
+ ev.preventDefault();
+ break;
+ case 'ArrowRight':
+ box.scrollTop += 40;
+ ev.preventDefault();
+ break;
+ case 'ArrowLeft':
+ box.scrollTop -= 40;
+ ev.preventDefault();
+ break;
+ default:
+ break;
+ }
+ });
+ /* -------------------------------------------------------------- */
+ } else {
+ $('#changelogData').html(loadingMessage);
+ $('#closeChangelogModal').text("Cancel");
}
$('#changelogModal').show();
- // Trigger the backend shell script via form submission //
- var formData = $('form[name="form"]').serializeArray();
+ /* ---------- NEW: focusable + give it focus ---------- */
+ $('#changelogContent').attr('tabindex', 0).focus();
+ /* ---------------------------------------------------- */
+
+ /* kick the backend */
+ const formData = $('form[name="form"]').serializeArray();
formData.push({ name: "action_script", value: "start_MerlinAUdownloadchangelog" });
- formData.push({ name: "action_wait", value: "10" });
-
- $.post('start_apply.htm', formData)
- .done(function(response) {
- console.log("Changelog trigger submitted successfully.");
- })
- .fail(function() {
- console.error("Failed to submit changelog trigger.");
- });
-
- // Record the start time and wait 8 seconds before attempting to fetch the changelog //
- var startTime = new Date().getTime();
- setTimeout(function() {
- FetchChangelog(startTime);
- // Once the changelog has loaded, update the button text to "Close"
- $('#closeChangelogModal').text("Close");
+ formData.push({ name: "action_wait", value: "10" });
+
+ $.post('start_apply.htm', formData);
+
+ /* wait 8 s, then fetch the changelog */
+ const startTime = Date.now();
+ setTimeout(function () {
+ FetchChangelog(startTime);
+ $('#closeChangelogModal').text("Close");
}, 8000);
return false;
}
+
// **Control "Approve/Block Changelog" Checkbox State** //
function ToggleChangelogApproval (checkboxElem)
{
@@ -1544,9 +1573,9 @@ function BlockChangelog()
document.form.submit();
}
-/**----------------------------------------**/
-/** Modified by Martinski W. [2025-Mar-07] **/
-/**----------------------------------------**/
+/**------------------------------------------**/
+/** Modified by ExtremeFiretop [2025-May-18] **/
+/**------------------------------------------**/
function InitializeFields()
{
console.log("Initializing fields...");
@@ -1642,7 +1671,9 @@ function InitializeFields()
{ tailscaleVPNEnabled.checked = (custom_settings.Allow_Updates_OverVPN === 'ENABLED'); }
if (script_AutoUpdate_Check)
- { script_AutoUpdate_Check.checked = (custom_settings.Allow_Script_Auto_Update === 'ENABLED'); }
+ { script_AutoUpdate_Check.checked = (custom_settings.Allow_Script_Auto_Update === 'ENABLED');
+ UpdateForceScriptCheckboxState(script_AutoUpdate_Check?.checked);
+ }
if (betaToReleaseUpdatesEnabled)
{ betaToReleaseUpdatesEnabled.checked = (custom_settings.FW_Allow_Beta_Production_Up === 'ENABLED'); }
@@ -2292,29 +2323,55 @@ function Uninstall()
document.form.submit();
}
-/**----------------------------------------**/
-/** Modified by Martinski W. [2025-May-11] **/
-/**----------------------------------------**/
+/**---------------------------------------**/
+/** Added by ExtremeFiretop [2025-May-18] **/
+/**---------------------------------------**/
+function UpdateForceScriptCheckboxState(autoUpdatesEnabled) {
+ const forceCB = document.getElementById('ForceScriptUpdateCheck');
+ if (!forceCB) return; // safety
+ forceCB.disabled = autoUpdatesEnabled; // gray‑out logic
+ forceCB.style.opacity = autoUpdatesEnabled ? '0.5' : '1';
+ if (autoUpdatesEnabled) forceCB.checked = false; // clear if now disabled
+}
+
+/**------------------------------------------**/
+/** Modified by ExtremeFiretop [2025-May-18] **/
+/**------------------------------------------**/
function UpdateMerlinAUScript()
{
console.log("Initiating MerlinAU script update…");
let actionScriptValue;
- let forceScriptUpdateCheck = document.getElementById('ForceScriptUpdateCheck');
+ const forceScriptUpdateCheck = document.getElementById('ForceScriptUpdateCheck');
+ const autoUpdatesEnabled = document.getElementById('Script_AutoUpdate_Check')?.checked;
+
+ /* ----- build the appropriate confirmation text ----- */
+ let confirmText;
+ if (forceScriptUpdateCheck.checked) {
+ /* user explicitly wants to install right now */
+ confirmText = "INSTALL UPDATE:\n" +
+ "Install the latest available MerlinAU script update now, " +
+ "even if the version is already current.\n\nContinue?";
+ } else {
+ /* normal check – message depends on auto‑update setting */
+ confirmText = "CHECK AND PROMPT:\n" +
+ "Check for a newer version of MerlinAU and prompt if found. " +
+ (autoUpdatesEnabled
+ ? "It DOES install automatically!" // <‑‑ NEW text
+ : "It does NOT install update automatically!") +
+ "\n\nContinue?";
+ }
- let confirmOK = confirm(
- forceScriptUpdateCheck.checked
- ? "INSTALL UPDATE:\nInstall the latest available MerlinAU script update now, even if version is current.\n\nContinue?"
- : "CHECK AND PROMPT:\nCheck for a newer version of MerlinAU and prompt if found. It does NOT install update automatically!\n\nContinue?");
- if (!confirmOK) { return; }
+ if (!confirm(confirmText)) return; /* user cancelled */
- if (!forceScriptUpdateCheck.checked)
- { actionScriptValue = 'start_MerlinAUscrptupdate'; }
- else
- { actionScriptValue = 'start_MerlinAUscrptupdate_force'; }
+ /* choose action script */
+ actionScriptValue = forceScriptUpdateCheck.checked
+ ? 'start_MerlinAUscrptupdate_force'
+ : 'start_MerlinAUscrptupdate';
+ /* submit the form */
document.form.action_script.value = actionScriptValue;
- document.form.action_wait.value = 10;
+ document.form.action_wait.value = 10;
showLoading();
document.form.submit();
}
@@ -2944,7 +3001,7 @@ function initializeCollapsibleSections()
-
+
diff --git a/MerlinAU.sh b/MerlinAU.sh
index 79daebaa..7082e068 100644
--- a/MerlinAU.sh
+++ b/MerlinAU.sh
@@ -4,15 +4,15 @@
#
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
-# Last Modified: 2025-May-17
+# Last Modified: 2025-May-18
###################################################################
set -u
## Set version for each Production Release ##
-readonly SCRIPT_VERSION=1.4.6
+readonly SCRIPT_VERSION=1.4.7
readonly SCRIPT_NAME="MerlinAU"
## Set to "master" for Production Releases ##
-SCRIPT_BRANCH="master"
+SCRIPT_BRANCH="dev"
##----------------------------------------##
## Modified by Martinski W. [2024-Jul-03] ##
@@ -4423,7 +4423,6 @@ _GetLoginCredentials_()
then
_WaitForEnterKey_ "$mainMenuReturnPromptStr"
_UpdateLoginPswdCheckHelper_ NoACCESS
- return 1
fi
# Get the Username from NVRAM #
@@ -7419,7 +7418,7 @@ _ChangelogVerificationCheck_()
}
##------------------------------------------##
-## Modified by ExtremeFiretop [2025-Apr-11] ##
+## Modified by ExtremeFiretop [2025-May-18] ##
##------------------------------------------##
_ManageChangelogMerlin_()
{
@@ -7464,6 +7463,12 @@ _ManageChangelogMerlin_()
fi
fi
+ # force 3006 changelog if tag is NG but $2 says 3006
+ if [ "$changeLogTag" = "NG" ] && [ $# -gt 1 ] && echo "$2" | grep -qE '^3006[.]' ; then
+ changeLogTag="3006"
+ MerlinChangeLogURL="${CL_URL_3006}"
+ fi
+
wgetLogFile="${FW_BIN_DIR}/${ScriptFNameTag}.WGET.LOG"
changeLogFile="${FW_BIN_DIR}/Changelog-${changeLogTag}.txt"
diff --git a/version.txt b/version.txt
index c514bd85..be05bba9 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-1.4.6
+1.4.7