mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-04-17 21:24:45 +10:00
fix for 1.1.83
This commit is contained in:
@@ -268,7 +268,16 @@ function OffUpdStatus {
|
||||
function OffPodcasts {
|
||||
|
||||
# Отключить подкасты
|
||||
$podcasts_off1 = 'album,playlist,artist,show,station,episode', 'album,playlist,artist,station'
|
||||
|
||||
$ofline_version2 = (Get-Item $spotifyExecutable).VersionInfo.FileVersion
|
||||
|
||||
if ($ofline_version2 -le "1.1.82.758") {
|
||||
$podcasts_off1 = 'album,playlist,artist,show,station,episode', 'album,playlist,artist,station'
|
||||
}
|
||||
if ($ofline_version2 -ge "1.1.83.954") {
|
||||
$podcasts_off1 = '"album","playlist","artist","show","station","episode"', '"album","playlist","artist","station"'
|
||||
}
|
||||
|
||||
$podcasts_off2 = ',this[.]enableShows=[a-z]'
|
||||
if ($xpui_js -match $podcasts_off1[0]) { $xpui_js = $xpui_js -replace $podcasts_off1[0], $podcasts_off1[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$podcasts_off1[0] в xpui.js" }
|
||||
if ($xpui_js -match $podcasts_off2) { $xpui_js = $xpui_js -replace $podcasts_off2, "" } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$podcasts_off2 в xpui.js" }
|
||||
@@ -281,30 +290,14 @@ function OffAdsOnFullscreen {
|
||||
$empty_block_ad = 'adsEnabled:!0', 'adsEnabled:!1'
|
||||
|
||||
# Активация полноэкранного режима, а также удаление кнопки и меню "Перейти на Premium"
|
||||
$ofline_version2 = (Get-Item $spotifyExecutable).VersionInfo.FileVersion
|
||||
|
||||
if ($ofline_version2 -eq "1.1.82.758" -or $ofline_version2 -eq "1.1.81.604" -or $ofline_version2 -eq "1.1.80.699") {
|
||||
|
||||
$full_screen_1 = '({return ..session},.=function\(.\){var .,.,.;return)("free")', '$1"premium"'
|
||||
$full_screen_2 = '(toLowerCase\(\)\)},.=function\(.\){var .,.,.;return)("premium")', '$1"free"'
|
||||
}
|
||||
if ($ofline_version2 -le "1.1.79.763" -or $ofline_version2 -ge "1.1.83.954") {
|
||||
|
||||
$full_screen_1 = '(session[,]{1}[a-z]{1}[=]{1}[a-z]{1}[=]{1}[>]{1}[{]{1}var [a-z]{1}[,]{1}[a-z]{1}[,]{1}[a-z]{1}[;]{1}[a-z]{6})(["]{1}free["]{1})', '$1"premium"'
|
||||
$full_screen_2 = '([a-z]{1}[.]{1}toLowerCase[(]{1}[)]{2}[}]{1}[,]{1}[a-z]{1}[=]{1}[a-z]{1}[=]{1}[>]{1}[{]{1}var [a-z]{1}[,]{1}[a-z]{1}[,]{1}[a-z]{1}[;]{1}return)(["]{1}premium["]{1})', '$1"free"'
|
||||
}
|
||||
$full_screen = 'return"free"===(.+?)return"premium"===', 'return"premium"===$1return"free"==='
|
||||
|
||||
# Отключиние спонсорской рекламы в некоторых плейлистах
|
||||
$playlist_ad_off = "allSponsorships"
|
||||
|
||||
# Отключение в меню кнопку "Скачать"
|
||||
$menu_download = 'return .\(\).createElement\(....,\{value:"download-playlist"\},.\(\).createElement\(..,.\)\)'
|
||||
|
||||
if ($xpui_js -match $empty_block_ad[0]) { $xpui_js = $xpui_js -replace $empty_block_ad[0], $empty_block_ad[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$empty_block_ad[0] в xpui.js" }
|
||||
if ($xpui_js -match $full_screen_1[0]) { $xpui_js = $xpui_js -replace $full_screen_1[0], $full_screen_1[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$full_screen_1[0] в xpui.js" }
|
||||
if ($xpui_js -match $full_screen_2[0]) { $xpui_js = $xpui_js -replace $full_screen_2[0], $full_screen_2[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$full_screen_2[0] в xpui.js" }
|
||||
if ($xpui_js -match $full_screen[0]) { $xpui_js = $xpui_js -replace $full_screen[0], $full_screen[1] } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$full_screen[0] в xpui.js" }
|
||||
if ($xpui_js -match $playlist_ad_off) { $xpui_js = $xpui_js -replace $playlist_ad_off, "" } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$playlist_ad_off в xpui.js" }
|
||||
if ($xpui_js -match $menu_download) { $xpui_js = $xpui_js -replace $menu_download, "" } else { Write-Host "Не нашел " -ForegroundColor red -NoNewline; Write-Host "переменную `$menu_download в xpui.js" }
|
||||
$xpui_js
|
||||
}
|
||||
|
||||
@@ -644,6 +637,12 @@ If (Test-Path $xpui_spa_patch) {
|
||||
$writer.Write($xpuiContents_xpui_css)
|
||||
# Скрыть иконку скачивание на разных страницах
|
||||
$writer.Write([System.Environment]::NewLine + ' .BKsbV2Xl786X9a09XROH {display: none}')
|
||||
# Скрыть подменю "загрузка"
|
||||
$writer.Write([System.Environment]::NewLine + ' button.wC9sIed7pfp47wZbmU6m.pzkhLqffqF_4hucrVVQA {display: none}')
|
||||
# Скрыть сломанное меню подкастов
|
||||
if ($podcasts_off) {
|
||||
$writer.Write([System.Environment]::NewLine + ' li.OEFWODerafYHGp09iLlA [href="/collection/podcasts"] {display: none}')
|
||||
}
|
||||
$writer.Close()
|
||||
|
||||
# *.Css
|
||||
|
||||
Reference in New Issue
Block a user