mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-04-23 11:30:19 +10:00
Update
- Added "Invite Collaborators" item to playlist menu - Bug fix if Spicetify was found
This commit is contained in:
33
Install.ps1
33
Install.ps1
@@ -322,6 +322,7 @@ function ExpFeature {
|
|||||||
if ($ofline -eq "1.1.84.716") {
|
if ($ofline -eq "1.1.84.716") {
|
||||||
$exp_features11 = '(lyrics_format:)(.)', '$1"fullscreen"'
|
$exp_features11 = '(lyrics_format:)(.)', '$1"fullscreen"'
|
||||||
}
|
}
|
||||||
|
$exp_features12 = '(Enable Playlist Permissions flows for Prod",default:)(!1)', '$1!0'
|
||||||
|
|
||||||
if ($xpui_js -match $exp_features1[0]) { $xpui_js = $xpui_js -replace $exp_features1[0], $exp_features1[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features1[0] in xpui.js" }
|
if ($xpui_js -match $exp_features1[0]) { $xpui_js = $xpui_js -replace $exp_features1[0], $exp_features1[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features1[0] in xpui.js" }
|
||||||
if ($xpui_js -match $exp_features2[0]) { $xpui_js = $xpui_js -replace $exp_features2[0], $exp_features2[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features2[0] in xpui.js" }
|
if ($xpui_js -match $exp_features2[0]) { $xpui_js = $xpui_js -replace $exp_features2[0], $exp_features2[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features2[0] in xpui.js" }
|
||||||
@@ -336,6 +337,7 @@ function ExpFeature {
|
|||||||
if ($ofline -eq "1.1.84.716") {
|
if ($ofline -eq "1.1.84.716") {
|
||||||
if ($xpui_js -match $exp_features11[0]) { $xpui_js = $xpui_js -replace $exp_features11[0], $exp_features11[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features11[0] in xpui.js" }
|
if ($xpui_js -match $exp_features11[0]) { $xpui_js = $xpui_js -replace $exp_features11[0], $exp_features11[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features11[0] in xpui.js" }
|
||||||
}
|
}
|
||||||
|
if ($xpui_js -match $exp_features12[0]) { $xpui_js = $xpui_js -replace $exp_features12[0], $exp_features12[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features12[0] in xpui.js" }
|
||||||
$xpui_js
|
$xpui_js
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,6 +373,7 @@ Remove-Item -Recurse -LiteralPath $tempDirectory
|
|||||||
$xpui_spa_patch = "$env:APPDATA\Spotify\Apps\xpui.spa"
|
$xpui_spa_patch = "$env:APPDATA\Spotify\Apps\xpui.spa"
|
||||||
$xpui_patch = "$env:APPDATA\Spotify\Apps\xpui\"
|
$xpui_patch = "$env:APPDATA\Spotify\Apps\xpui\"
|
||||||
$xpui_js_patch = "$env:APPDATA\Spotify\Apps\xpui\xpui.js"
|
$xpui_js_patch = "$env:APPDATA\Spotify\Apps\xpui\xpui.js"
|
||||||
|
$xpui_css_patch = "$env:APPDATA\Spotify\Apps\xpui\xpui.css"
|
||||||
|
|
||||||
$test_spa = Test-Path -Path $env:APPDATA\Spotify\Apps\xpui.spa
|
$test_spa = Test-Path -Path $env:APPDATA\Spotify\Apps\xpui.spa
|
||||||
$test_js = Test-Path -Path $env:APPDATA\Spotify\Apps\xpui\xpui.js
|
$test_js = Test-Path -Path $env:APPDATA\Spotify\Apps\xpui\xpui.js
|
||||||
@@ -392,6 +395,7 @@ if (Test-Path $xpui_js_patch) {
|
|||||||
If (!($xpui_js -match 'patched by spotx')) {
|
If (!($xpui_js -match 'patched by spotx')) {
|
||||||
$spotx_new = $true
|
$spotx_new = $true
|
||||||
Copy-Item $xpui_js_patch "$xpui_js_patch.bak"
|
Copy-Item $xpui_js_patch "$xpui_js_patch.bak"
|
||||||
|
Copy-Item $xpui_css_patch "$xpui_css_patch.bak"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Turn off podcasts
|
# Turn off podcasts
|
||||||
@@ -426,6 +430,27 @@ if (Test-Path $xpui_js_patch) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# xpui.css
|
||||||
|
$file_xpui_css = get-item $env:APPDATA\Spotify\Apps\xpui\xpui.css
|
||||||
|
$reader = New-Object -TypeName System.IO.StreamReader -ArgumentList $file_xpui_css
|
||||||
|
$xpuiContents_xpui_css = $reader.ReadToEnd()
|
||||||
|
$reader.Close()
|
||||||
|
|
||||||
|
$writer = New-Object System.IO.StreamWriter -ArgumentList $file_xpui_css
|
||||||
|
$writer.BaseStream.SetLength(0)
|
||||||
|
$writer.Write($xpuiContents_xpui_css)
|
||||||
|
# Hide download icon on different pages
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' .BKsbV2Xl786X9a09XROH{display:none}')
|
||||||
|
# Hide submenu item "download"
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' button.wC9sIed7pfp47wZbmU6m.pzkhLqffqF_4hucrVVQA{display:none}')
|
||||||
|
# Hide Collaborators icon
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' .X1lXSiVj0pzhQCUo_72A{display:none}')
|
||||||
|
# Hide broken podcast menu
|
||||||
|
if ($podcasts_off) {
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' li.OEFWODerafYHGp09iLlA [href="/collection/podcasts"]{display:none}')
|
||||||
|
}
|
||||||
|
$writer.Close()
|
||||||
|
|
||||||
# licenses.html minification
|
# licenses.html minification
|
||||||
$file_licenses = get-item $env:APPDATA\Spotify\Apps\xpui\licenses.html
|
$file_licenses = get-item $env:APPDATA\Spotify\Apps\xpui\licenses.html
|
||||||
$reader = New-Object -TypeName System.IO.StreamReader -ArgumentList $file_licenses
|
$reader = New-Object -TypeName System.IO.StreamReader -ArgumentList $file_licenses
|
||||||
@@ -525,12 +550,14 @@ If (Test-Path $xpui_spa_patch) {
|
|||||||
$writer.BaseStream.SetLength(0)
|
$writer.BaseStream.SetLength(0)
|
||||||
$writer.Write($xpuiContents_xpui_css)
|
$writer.Write($xpuiContents_xpui_css)
|
||||||
# Hide download icon on different pages
|
# Hide download icon on different pages
|
||||||
$writer.Write([System.Environment]::NewLine + ' .BKsbV2Xl786X9a09XROH {display: none}')
|
$writer.Write([System.Environment]::NewLine + ' .BKsbV2Xl786X9a09XROH{display:none}')
|
||||||
# Hide submenu item "download"
|
# Hide submenu item "download"
|
||||||
$writer.Write([System.Environment]::NewLine + ' button.wC9sIed7pfp47wZbmU6m.pzkhLqffqF_4hucrVVQA {display: none}')
|
$writer.Write([System.Environment]::NewLine + ' button.wC9sIed7pfp47wZbmU6m.pzkhLqffqF_4hucrVVQA{display:none}')
|
||||||
|
# Hide Collaborators icon
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' .X1lXSiVj0pzhQCUo_72A{display:none}')
|
||||||
# Hide broken podcast menu
|
# Hide broken podcast menu
|
||||||
if ($podcasts_off) {
|
if ($podcasts_off) {
|
||||||
$writer.Write([System.Environment]::NewLine + ' li.OEFWODerafYHGp09iLlA [href="/collection/podcasts"] {display: none}')
|
$writer.Write([System.Environment]::NewLine + ' li.OEFWODerafYHGp09iLlA [href="/collection/podcasts"]{display:none}')
|
||||||
}
|
}
|
||||||
$writer.Close()
|
$writer.Close()
|
||||||
|
|
||||||
|
|||||||
@@ -315,6 +315,9 @@ function OffRujs {
|
|||||||
function ExpFeature {
|
function ExpFeature {
|
||||||
|
|
||||||
# Эксперементальные фишки
|
# Эксперементальные фишки
|
||||||
|
|
||||||
|
$ofline = Check_verison_clients -param2 "offline"
|
||||||
|
|
||||||
$exp_features1 = '(Show "Made For You" entry point in the left sidebar.,default:)(!1)', '$1!0'
|
$exp_features1 = '(Show "Made For You" entry point in the left sidebar.,default:)(!1)', '$1!0'
|
||||||
$exp_features2 = '(Enable the new Search with chips experience",default:)(!1)', '$1!0'
|
$exp_features2 = '(Enable the new Search with chips experience",default:)(!1)', '$1!0'
|
||||||
$exp_features3 = '(Enable Liked Songs section on Artist page",default:)(!1)', '$1!0'
|
$exp_features3 = '(Enable Liked Songs section on Artist page",default:)(!1)', '$1!0'
|
||||||
@@ -328,20 +331,22 @@ function ExpFeature {
|
|||||||
if ($ofline -eq "1.1.84.716") {
|
if ($ofline -eq "1.1.84.716") {
|
||||||
$exp_features11 = '(lyrics_format:)(.)', '$1"fullscreen"'
|
$exp_features11 = '(lyrics_format:)(.)', '$1"fullscreen"'
|
||||||
}
|
}
|
||||||
|
$exp_features12 = '(Enable Playlist Permissions flows for Prod",default:)(!1)', '$1!0'
|
||||||
|
|
||||||
if ($xpui_js -match $exp_features1[0]) { $xpui_js = $xpui_js -replace $exp_features1[0], $exp_features1[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features1[0] in xpui.js" }
|
if ($xpui_js -match $exp_features1[0]) { $xpui_js = $xpui_js -replace $exp_features1[0], $exp_features1[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features1[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features2[0]) { $xpui_js = $xpui_js -replace $exp_features2[0], $exp_features2[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features2[0] in xpui.js" }
|
if ($xpui_js -match $exp_features2[0]) { $xpui_js = $xpui_js -replace $exp_features2[0], $exp_features2[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features2[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features3[0]) { $xpui_js = $xpui_js -replace $exp_features3[0], $exp_features3[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features3[0] in xpui.js" }
|
if ($xpui_js -match $exp_features3[0]) { $xpui_js = $xpui_js -replace $exp_features3[0], $exp_features3[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features3[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features4[0]) { $xpui_js = $xpui_js -replace $exp_features4[0], $exp_features4[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features4[0] in xpui.js" }
|
if ($xpui_js -match $exp_features4[0]) { $xpui_js = $xpui_js -replace $exp_features4[0], $exp_features4[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features4[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features5[0]) { $xpui_js = $xpui_js -replace $exp_features5[0], $exp_features5[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features5[0] in xpui.js" }
|
if ($xpui_js -match $exp_features5[0]) { $xpui_js = $xpui_js -replace $exp_features5[0], $exp_features5[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features5[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features6[0]) { $xpui_js = $xpui_js -replace $exp_features6[0], $exp_features6[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features6[0] in xpui.js" }
|
if ($xpui_js -match $exp_features6[0]) { $xpui_js = $xpui_js -replace $exp_features6[0], $exp_features6[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features6[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features7[0]) { $xpui_js = $xpui_js -replace $exp_features7[0], $exp_features7[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features7[0] in xpui.js" }
|
if ($xpui_js -match $exp_features7[0]) { $xpui_js = $xpui_js -replace $exp_features7[0], $exp_features7[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features7[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features8[0]) { $xpui_js = $xpui_js -replace $exp_features8[0], $exp_features8[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features8[0] in xpui.js" }
|
if ($xpui_js -match $exp_features8[0]) { $xpui_js = $xpui_js -replace $exp_features8[0], $exp_features8[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features8[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features9[0]) { $xpui_js = $xpui_js -replace $exp_features9[0], $exp_features9[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features9[0] in xpui.js" }
|
if ($xpui_js -match $exp_features9[0]) { $xpui_js = $xpui_js -replace $exp_features9[0], $exp_features9[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features9[0] в xpui.js" }
|
||||||
if ($xpui_js -match $exp_features10[0]) { $xpui_js = $xpui_js -replace $exp_features10[0], $exp_features10[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features10[0] in xpui.js" }
|
if ($xpui_js -match $exp_features10[0]) { $xpui_js = $xpui_js -replace $exp_features10[0], $exp_features10[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features10[0] в xpui.js" }
|
||||||
if ($ofline -eq "1.1.84.716") {
|
if ($ofline -eq "1.1.84.716") {
|
||||||
if ($xpui_js -match $exp_features11[0]) { $xpui_js = $xpui_js -replace $exp_features11[0], $exp_features11[1] } else { Write-Host "Didn't find variable " -ForegroundColor red -NoNewline; Write-Host "`$exp_features11[0] in xpui.js" }
|
if ($xpui_js -match $exp_features11[0]) { $xpui_js = $xpui_js -replace $exp_features11[0], $exp_features11[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features11[0] в xpui.js" }
|
||||||
}
|
}
|
||||||
|
if ($xpui_js -match $exp_features12[0]) { $xpui_js = $xpui_js -replace $exp_features12[0], $exp_features12[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$exp_features12[0] в xpui.js" }
|
||||||
$xpui_js
|
$xpui_js
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -463,6 +468,7 @@ Remove-Item -Recurse -LiteralPath $tempDirectory
|
|||||||
$xpui_spa_patch = "$env:APPDATA\Spotify\Apps\xpui.spa"
|
$xpui_spa_patch = "$env:APPDATA\Spotify\Apps\xpui.spa"
|
||||||
$xpui_patch = "$env:APPDATA\Spotify\Apps\xpui\"
|
$xpui_patch = "$env:APPDATA\Spotify\Apps\xpui\"
|
||||||
$xpui_js_patch = "$env:APPDATA\Spotify\Apps\xpui\xpui.js"
|
$xpui_js_patch = "$env:APPDATA\Spotify\Apps\xpui\xpui.js"
|
||||||
|
$xpui_css_patch = "$env:APPDATA\Spotify\Apps\xpui\xpui.css"
|
||||||
|
|
||||||
$test_spa = Test-Path -Path $env:APPDATA\Spotify\Apps\xpui.spa
|
$test_spa = Test-Path -Path $env:APPDATA\Spotify\Apps\xpui.spa
|
||||||
$test_js = Test-Path -Path $env:APPDATA\Spotify\Apps\xpui\xpui.js
|
$test_js = Test-Path -Path $env:APPDATA\Spotify\Apps\xpui\xpui.js
|
||||||
@@ -489,6 +495,7 @@ if (Test-Path $xpui_js_patch) {
|
|||||||
If (!($xpui_js -match 'patched by spotx')) {
|
If (!($xpui_js -match 'patched by spotx')) {
|
||||||
$spotx_new = $true
|
$spotx_new = $true
|
||||||
Copy-Item $xpui_js_patch "$xpui_js_patch.bak"
|
Copy-Item $xpui_js_patch "$xpui_js_patch.bak"
|
||||||
|
Copy-Item $xpui_css_patch "$xpui_css_patch.bak"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Отключить подкасты
|
# Отключить подкасты
|
||||||
@@ -539,6 +546,27 @@ if (Test-Path $xpui_js_patch) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# xpui.css
|
||||||
|
$file_xpui_css = get-item $env:APPDATA\Spotify\Apps\xpui\xpui.css
|
||||||
|
$reader = New-Object -TypeName System.IO.StreamReader -ArgumentList $file_xpui_css
|
||||||
|
$xpuiContents_xpui_css = $reader.ReadToEnd()
|
||||||
|
$reader.Close()
|
||||||
|
|
||||||
|
$writer = New-Object System.IO.StreamWriter -ArgumentList $file_xpui_css
|
||||||
|
$writer.BaseStream.SetLength(0)
|
||||||
|
$writer.Write($xpuiContents_xpui_css)
|
||||||
|
# Скрыть иконку скачивание на разных страницах
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' .BKsbV2Xl786X9a09XROH{display:none}')
|
||||||
|
# Скрыть подменю "загрузка"
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' button.wC9sIed7pfp47wZbmU6m.pzkhLqffqF_4hucrVVQA{display:none}')
|
||||||
|
# Скрыть иконку соавторов
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' .X1lXSiVj0pzhQCUo_72A{display:none}')
|
||||||
|
# Скрыть сломанное меню подкастов
|
||||||
|
if ($podcasts_off) {
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' li.OEFWODerafYHGp09iLlA [href="/collection/podcasts"]{display:none}')
|
||||||
|
}
|
||||||
|
$writer.Close()
|
||||||
|
|
||||||
# Минификация licenses.html
|
# Минификация licenses.html
|
||||||
$file_licenses = get-item $env:APPDATA\Spotify\Apps\xpui\licenses.html
|
$file_licenses = get-item $env:APPDATA\Spotify\Apps\xpui\licenses.html
|
||||||
$reader = New-Object -TypeName System.IO.StreamReader -ArgumentList $file_licenses
|
$reader = New-Object -TypeName System.IO.StreamReader -ArgumentList $file_licenses
|
||||||
@@ -665,6 +693,8 @@ If (Test-Path $xpui_spa_patch) {
|
|||||||
$writer.Write([System.Environment]::NewLine + ' .BKsbV2Xl786X9a09XROH {display: none}')
|
$writer.Write([System.Environment]::NewLine + ' .BKsbV2Xl786X9a09XROH {display: none}')
|
||||||
# Скрыть подменю "загрузка"
|
# Скрыть подменю "загрузка"
|
||||||
$writer.Write([System.Environment]::NewLine + ' button.wC9sIed7pfp47wZbmU6m.pzkhLqffqF_4hucrVVQA {display: none}')
|
$writer.Write([System.Environment]::NewLine + ' button.wC9sIed7pfp47wZbmU6m.pzkhLqffqF_4hucrVVQA {display: none}')
|
||||||
|
# Скрыть иконку соавторов
|
||||||
|
$writer.Write([System.Environment]::NewLine + ' .X1lXSiVj0pzhQCUo_72A{display:none}')
|
||||||
# Скрыть сломанное меню подкастов
|
# Скрыть сломанное меню подкастов
|
||||||
if ($podcasts_off) {
|
if ($podcasts_off) {
|
||||||
$writer.Write([System.Environment]::NewLine + ' li.OEFWODerafYHGp09iLlA [href="/collection/podcasts"] {display: none}')
|
$writer.Write([System.Environment]::NewLine + ' li.OEFWODerafYHGp09iLlA [href="/collection/podcasts"] {display: none}')
|
||||||
|
|||||||
Reference in New Issue
Block a user