diff --git a/Install.ps1 b/Install.ps1 index df32fea..2969957 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -431,9 +431,7 @@ if ($test_spa -and $test_js) { if (Test-Path $xpui_js_patch) { Write-Host "Spicetify detected"`n - - - + $reader = New-Object -TypeName System.IO.StreamReader -ArgumentList $xpui_js_patch $xpui_js = $reader.ReadToEnd() $reader.Close() @@ -564,6 +562,7 @@ If (Test-Path $xpui_spa_patch) { $xpuiContents_css = $xpuiContents_css ` <# Remove RTL #>` + -replace "}\[dir=ltr\]\s?([.a-zA-Z\d[_]+?,\[dir=ltr\])", '}[dir=str] $1' ` -replace "}\[dir=ltr\]\s?", "} " ` -replace "html\[dir=ltr\]", "html" ` -replace ",\s?\[dir=rtl\].+?(\{.+?\})", '$1' ` @@ -576,6 +575,7 @@ If (Test-Path $xpui_spa_patch) { -replace "html\[dir=rtl\].+?\{.+?\}", "" ` -replace "html\[lang=ar\].+?\{.+?\}", "" ` -replace "\[dir=rtl\].+?\{.+?\}", "" ` + -replace "\[dir=str\]", "[dir=ltr]" ` <# Css minification #>` -replace "[/]\*([^*]|[\r\n]|(\*([^/]|[\r\n])))*\*[/]", "" ` -replace "[/][/]#\s.*", "" ` diff --git a/Install_rus.ps1 b/Install_rus.ps1 index 496248b..d5b90ce 100644 --- a/Install_rus.ps1 +++ b/Install_rus.ps1 @@ -702,7 +702,8 @@ If (Test-Path $xpui_spa_patch) { $xpuiContents_css = $xpuiContents_css ` - <# Remove RTL #>` + <# удаление RTL правил #>` + -replace "}\[dir=ltr\]\s?([.a-zA-Z\d[_]+?,\[dir=ltr\])", '}[dir=str] $1' ` -replace "}\[dir=ltr\]\s?", "} " ` -replace "html\[dir=ltr\]", "html" ` -replace ",\s?\[dir=rtl\].+?(\{.+?\})", '$1' ` @@ -715,6 +716,7 @@ If (Test-Path $xpui_spa_patch) { -replace "html\[dir=rtl\].+?\{.+?\}", "" ` -replace "html\[lang=ar\].+?\{.+?\}", "" ` -replace "\[dir=rtl\].+?\{.+?\}", "" ` + -replace "\[dir=str\]", "[dir=ltr]" ` <# минификация css #>` -replace "[/]\*([^*]|[\r\n]|(\*([^/]|[\r\n])))*\*[/]", "" ` -replace "[/][/]#\s.*", "" `