2929<script language =" JavaScript" type =" text/javascript" >
3030
3131/* *----------------------------**/
32- /* * Last Modified: 2025-May-10 **/
32+ /* * Last Modified: 2025-May-11 **/
3333/* *----------------------------**/
3434
3535// Separate variables for shared and AJAX settings //
@@ -988,7 +988,7 @@ function GetExternalCheckResults()
988988 if (externalCheckOK)
989989 {
990990 fwUpdateDirPath .ResetExtCheckVars ();
991- showScriptUpdateBanner ();
991+ ShowScriptUpdateBanner ();
992992 return true ;
993993 }
994994 let fwUpdateZIPdirectory = document .getElementById (' fwUpdateZIPDirectory' );
@@ -2034,26 +2034,34 @@ function UpdateScriptVersion()
20342034 $ (' #footerTitle' ).text (' MerlinAU v' + localVers + ' by ExtremeFiretop & Martinski W.' );
20352035}
20362036
2037- /* *---------------------------------------**/
2038- /* * Added by ExtremeFiretop [2025-May-10] **/
2039- /* *---------------------------------------**/
2040- function showScriptUpdateBanner () {
2041- const localVers = GetScriptVersion (' local' );
2042- if (typeof isScriptUpdateAvailable === ' undefined' ) return ;
2043-
2044- if (isScriptUpdateAvailable && isScriptUpdateAvailable !== localVers) {
2045- const host = document .getElementById (' ScriptUpdateNotice' );
2046- if (! host) return ;
2047-
2048- host .innerHTML =
2049- InvREDct +
2050- ' Script Update Available → v' +
2051- isScriptUpdateAvailable +
2052- InvCLEAR;
2053-
2054- host .style .cssText =
2055- ' float:right;margin-left:auto;font-weight:bold;white-space:nowrap;' ;
2056- }
2037+ /* *----------------------------------------**/
2038+ /* * Modified by Martinski W. [2025-May-11] **/
2039+ /* *----------------------------------------**/
2040+ function ShowScriptUpdateBanner ()
2041+ {
2042+ const localVers = GetScriptVersion (' local' );
2043+ const updateNotice = document .getElementById (' ScriptUpdateNotice' );
2044+
2045+ if (updateNotice === null ||
2046+ typeof updateNotice === ' undefined' ||
2047+ typeof isScriptUpdateAvailable === ' undefined' )
2048+ { return ; }
2049+
2050+ if (isScriptUpdateAvailable !== ' TBD' &&
2051+ isScriptUpdateAvailable !== localVers)
2052+ {
2053+ updateNotice .innerHTML =
2054+ InvREDct +
2055+ ' Script Update Available → v' + isScriptUpdateAvailable +
2056+ InvCLEAR;
2057+
2058+ updateNotice .style .cssText =
2059+ ' float:right;margin-left:auto;font-weight:bold;white-space:nowrap;' ;
2060+
2061+ showhide (' ScriptUpdateNotice' ,true );
2062+ }
2063+ else
2064+ { showhide (' ScriptUpdateNotice' ,false ); }
20572065}
20582066
20592067/* *----------------------------------------**/
@@ -2284,25 +2292,26 @@ function Uninstall()
22842292 document .form .submit ();
22852293}
22862294
2287- /* *---------------------------------------**/
2288- /* * Added by ExtremeFiretop [2025-May-10 ] **/
2289- /* *---------------------------------------**/
2290- function UpdateMerlinAUScript ()
2295+ /* *---------------------------------------- **/
2296+ /* * Modified by Martinski W. [2025-May-11 ] **/
2297+ /* *---------------------------------------- **/
2298+ function UpdateMerlinAUScript ()
22912299{
22922300 console .log (" Initiating MerlinAU script update…" );
22932301
22942302 let actionScriptValue;
2295- let ForceScriptUpdateCheck = document .getElementById (' ForceScriptUpdateCheck' );
2296- let ok = confirm (
2297- ForceScriptUpdateCheck .checked
2298- ? " INSTALL UPDATE: Install MerlinAU script update immediately. Even if current.\n\n Continue?"
2299- : " VERIFY AND PROMPT: Check for a newer version of MerlinAU and prompt if found. Does NOT install! \n\n Continue?" );
2300- if (! ok) return ;
2301-
2302- if (! ForceScriptUpdateCheck .checked )
2303- { actionScriptValue = ' start_MerlinAUupdate' ; }
2303+ let forceScriptUpdateCheck = document .getElementById (' ForceScriptUpdateCheck' );
2304+
2305+ let confirmOK = confirm (
2306+ forceScriptUpdateCheck .checked
2307+ ? " INSTALL UPDATE:\n Install the latest available MerlinAU script update now, even if version is current.\n\n Continue?"
2308+ : " CHECK AND PROMPT:\n Check for a newer version of MerlinAU and prompt if found. It does NOT install update automatically!\n\n Continue?" );
2309+ if (! confirmOK) { return ; }
2310+
2311+ if (! forceScriptUpdateCheck .checked )
2312+ { actionScriptValue = ' start_MerlinAUscrptupdate' ; }
23042313 else
2305- { actionScriptValue = ' start_MerlinAUupdate_forceupdate ' ; }
2314+ { actionScriptValue = ' start_MerlinAUscrptupdate_force ' ; }
23062315
23072316 document .form .action_script .value = actionScriptValue;
23082317 document .form .action_wait .value = 10 ;
@@ -2311,7 +2320,7 @@ function UpdateMerlinAUScript ()
23112320}
23122321
23132322/* *----------------------------------------**/
2314- /* * Modified by Martinski W. [2025-Jan-22 ] **/
2323+ /* * Modified by Martinski W. [2025-May-11 ] **/
23152324/* *----------------------------------------**/
23162325function CheckFirmwareUpdate ()
23172326{
@@ -2321,13 +2330,13 @@ function CheckFirmwareUpdate()
23212330 let bypassPostponedDays = document .getElementById (' BypassPostponedDays' );
23222331 if (! bypassPostponedDays .checked )
23232332 {
2324- actionScriptValue = ' start_MerlinAUcheckupdate ' ;
2333+ actionScriptValue = ' start_MerlinAUcheckfwupdate ' ;
23252334 if (! confirm (" NOTE:\n If you have no postponement days set or remaining, the firmware may flash NOW!\n This means logging you out of the WebUI and rebooting the router.\n Continue to check for firmware updates now?" ))
23262335 { return ; }
23272336 }
23282337 else
23292338 {
2330- actionScriptValue = ' start_MerlinAUcheckupdate_bypassDays ' ;
2339+ actionScriptValue = ' start_MerlinAUcheckfwupdate_bypassDays ' ;
23312340 if (! confirm (" NOTE:\n The firmware may flash NOW!\n This means logging you out of the WebUI and rebooting the router.\n Continue to check for firmware updates now?" ))
23322341 { return ; }
23332342 }
@@ -2703,13 +2712,9 @@ function initializeCollapsibleSections()
27032712 name=" button " >
27042713 <br>
27052714 <label style=" color:#FFCC00; margin-top: 5px; margin-bottom:8px " >
2706- <input type=" checkbox "
2707- id=" ForceScriptUpdateCheck "
2708- name=" ForceScriptUpdateCheck "
2715+ <input type=" checkbox " id=" ForceScriptUpdateCheck " name=" ForceScriptUpdateCheck "
27092716 style=" padding:0; vertical-align:middle; position:relative;
2710- margin-left:-5px; margin-top:5px; margin-bottom:8px " />
2711- Install script update
2712- </label>
2717+ margin-left:-5px; margin-top:5px; margin-bottom:8px " />Install script update</label>
27132718 </br>
27142719</td>
27152720<td style=" text-align: left; border: none; " >
0 commit comments