From 6c360eebdebafa5df17cbfeb078dc910c7ef3d75 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Mon, 9 Sep 2024 21:12:30 -0400 Subject: [PATCH] Start on #448 --- Includes/_URLModifications.au3 | 2 +- MSEdgeRedirect.au3 | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Includes/_URLModifications.au3 b/Includes/_URLModifications.au3 index a979e37..7ca7e49 100644 --- a/Includes/_URLModifications.au3 +++ b/Includes/_URLModifications.au3 @@ -133,7 +133,7 @@ Func _ChangeNewsProvider($sURL) $aURL = StringSplit($sURL, "/") $sURL = "" - For $iLoop = 1 To $aURL[0] Step 1 ; Get longest section (Article Title) + For $iLoop = 1 To $aURL[0] - 1 Step 1 ; Get longest section (Article Title), Skip Metadata If StringLen($aURL[$iLoop]) > StringLen($sURL) Then $sURL = $aURL[$iLoop] Next diff --git a/MSEdgeRedirect.au3 b/MSEdgeRedirect.au3 index 571d1c7..15ee9b6 100644 --- a/MSEdgeRedirect.au3 +++ b/MSEdgeRedirect.au3 @@ -53,13 +53,14 @@ ProcessCMDLine() Func ActiveMode(ByRef $aCMDLine) + Local $iIndex Local $sCMDLine = "" Local $sParent = _WinAPI_GetProcessName(_WinAPI_GetParentProcess()) $aCMDLine = FixTreeIntegrity($aCMDLine) CheckEdgeIntegrity($aCMDLine[1]) $aCMDLine[1] = StringReplace($aCMDLine[1], "msedge.exe", "msedge_IFEO.exe") - + Select Case $aCMDLine[0] = 1 ; No Parameters ContinueCase @@ -90,7 +91,11 @@ Func ActiveMode(ByRef $aCMDLine) Case _ArraySearch($aCMDLine, "--profile-directory=", 2, 0, 0, 1) > 0 ; #68, Multiple Profiles ContinueCase Case $sParent = "MSEdgeRedirect.exe" - $sCMDLine = _ArrayToString($aCMDLine, " ", 2, -1) + $iIndex = _ArraySearch($aCMDLine, "--from-ie-to-edge", 2, 0, 0, 1) + If $iIndex Then + _ArrayDelete($aCMDLine, $iIndex) + $sCMDLine = _ArrayToString($aCMDLine, " ", 2, -1) + EndIf _SafeRun($aCMDLine[1], $sCMDLine) Case $sParent = "BrowserSelect.exe" ; TODO: DOUBLE CHECK $aCMDLine[2] ContinueCase