Skip to content

Commit e69bab9

Browse files
Update MerlinAU.asp
1 parent 0e6ce4b commit e69bab9

File tree

1 file changed

+47
-4
lines changed

1 file changed

+47
-4
lines changed

MerlinAU.asp

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,6 +2260,29 @@ function Uninstall()
22602260
document.form.submit();
22612261
}
22622262
2263+
function UpdateMerlinAUScript ()
2264+
{
2265+
console.log("Initiating MerlinAU script update…");
2266+
2267+
let forceUpdateBox = document.getElementById('ForceScriptUpdateCheck');
2268+
let actionScriptName = forceUpdateBox.checked
2269+
? 'start_MerlinAUforceupdate'
2270+
: 'start_MerlinAUscript_update';
2271+
2272+
let ok = confirm(
2273+
forceUpdateBox.checked
2274+
? "FORCED UPDATE: install immediately—even if current.\n\nContinue?"
2275+
: "Install only if a newer version exists.\n\nContinue?");
2276+
if (!ok) return false; // <-- blocks submission
2277+
2278+
document.form.action_script.value = actionScriptName;
2279+
document.form.action_wait.value = 10;
2280+
showLoading();
2281+
document.form.submit();
2282+
2283+
return false; // prevent the button’s own default submit (avoids double‑post)
2284+
}
2285+
22632286
/**----------------------------------------**/
22642287
/** Modified by Martinski W. [2025-Jan-22] **/
22652288
/**----------------------------------------**/
@@ -2618,9 +2641,10 @@ function initializeCollapsibleSections()
26182641
<div style="text-align: center; margin-top: 3px;">
26192642
<table width="100%" border="0" cellpadding="10" cellspacing="0" style="table-layout: fixed; border-collapse: collapse; background-color: transparent;">
26202643
<colgroup>
2621-
<col style="width: 33%;" />
2622-
<col style="width: 33%;" />
2623-
<col style="width: 33%;" />
2644+
<col style="width: 25%;" />
2645+
<col style="width: 25%;" />
2646+
<col style="width: 25%;" />
2647+
<col style="width: 25%;" />
26242648
</colgroup>
26252649
<tr>
26262650
<td style="text-align: right; border: none;">
@@ -2638,9 +2662,28 @@ function initializeCollapsibleSections()
26382662
<br>
26392663
<label style="color:#FFCC00; margin-top: 5px; margin-bottom:8x">
26402664
<input type="checkbox" id="approveChangelogCheck" name="approveChangelogCheck" onclick="ToggleChangelogApproval(this);"
2641-
style="padding:0; vertical-align:middle; position:relative; margin-left:-5px; margin-top:5px; margin-bottom:8px"/>Approve Changelog</label>
2665+
style="padding:0; vertical-align:middle; position:relative; margin-left:-5px; margin-top:5px; margin-bottom:8px"/>Approve changelog</label>
26422666
</br>
26432667
</td>
2668+
<td style="text-align: center; border: none;" id="scriptUpdateCell">
2669+
<input type="submit"
2670+
id="ScriptUpdateButton"
2671+
onclick="return UpdateMerlinAUScript();"
2672+
value="Update Script"
2673+
class="button_gen savebutton"
2674+
title="Check for latest MerlinAU script updates"
2675+
name="button">
2676+
<br>
2677+
<label style="color:#FFCC00; margin-top: 5px; margin-bottom:8px">
2678+
<input type="checkbox"
2679+
id="ForceScriptUpdateCheck"
2680+
name="ForceScriptUpdateCheck"
2681+
style="padding:0; vertical-align:middle; position:relative;
2682+
margin-left:-5px; margin-top:5px; margin-bottom:8px"/>
2683+
Force script update
2684+
</label>
2685+
</br>
2686+
</td>
26442687
<td style="text-align: left; border: none;">
26452688
<input type="submit" id="UninstallButton" onclick="Uninstall(); return false;"
26462689
value="Uninstall" class="button_gen savebutton" name="button">

0 commit comments

Comments
 (0)