From 3da3216b8546e55f4985d596e85b974f06fcab78 Mon Sep 17 00:00:00 2001 From: amd64fox Date: Mon, 6 Dec 2021 06:40:30 +0300 Subject: [PATCH] Full screen mode activated --- Install.ps1 | 36 +++++++++++++++++++----------------- Install_rus.ps1 | 37 +++++++++++++++++++------------------ README.md | 3 ++- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index 375c90c..5db7cc0 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -180,22 +180,22 @@ $xpui_js_patch = "$env:APPDATA\Spotify\Apps\xpui\xpui.js" If (Test-Path $xpui_js_patch) { Write-Host "Spicetify detected"`n + $xpui_js = Get-Content $xpui_js_patch -Raw If (!($xpui_js -match 'patched by spotx')) { - + Copy-Item $xpui_js_patch "$xpui_js_patch.bak" - - - $xpui_js -match 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.' | Out-Null - $menu_split_js = $Matches[0] -split 'createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.' $new_js = $xpui_js ` - <# Removing "Upgrade button" #> -replace ">=1024", ">=1000024" ` - <# Removing an empty block #> -replace 'adsEnabled:!0', 'adsEnabled:!1' ` - <# Removing "Upgrade to premium" menu #> -replace 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.', $menu_split_js ` - <# Disabling a playlist sponsor #> -replace "allSponsorships", "" + <# Removing an empty block #> ` + -replace 'adsEnabled:!0', 'adsEnabled:!1' ` + <# Full screen mode activation and removing "Upgrade to premium" menu, upgrade button #> ` + -replace '(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"' ` + -replace '([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"' ` + <# Disabling a playlist sponsor #>` + -replace "allSponsorships", "" # Disable Podcast if ($Podcasts_off) { @@ -244,14 +244,16 @@ If (Test-Path $xpui_spa_patch) { $xpuiContents = $reader.ReadToEnd() $reader.Close() - $xpuiContents -match 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.' | Out-Null - $menu_split_js = $Matches[0] -split 'createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.' $xpuiContents = $xpuiContents ` - <# Removing "Upgrade button" #> -replace ">=1024", ">=1000024" ` - <# Removing an empty block #> -replace 'adsEnabled:!0', 'adsEnabled:!1' ` - <# Removing "Upgrade to premium" menu #> -replace 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.', $menu_split_js ` - <# Disabling a playlist sponsor #> -replace "allSponsorships", "" ` - <# Disable Logging #> -replace "sp://logging/v3/\w+", "" + <# Removing an empty block #> ` + -replace 'adsEnabled:!0', 'adsEnabled:!1' ` + <# Full screen mode activation and removing "Upgrade to premium" menu, upgrade button #> ` + -replace '(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"' ` + -replace '([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"' ` + <# Disabling a playlist sponsor #>` + -replace "allSponsorships", "" ` + <# Disable Logging #>` + -replace "sp://logging/v3/\w+", "" # Disable Podcast if ($Podcasts_off) { @@ -625,4 +627,4 @@ if ($ch -eq 'u') { } } -exit +exit \ No newline at end of file diff --git a/Install_rus.ps1 b/Install_rus.ps1 index 011a0c0..15da566 100644 --- a/Install_rus.ps1 +++ b/Install_rus.ps1 @@ -181,22 +181,21 @@ $xpui_js_patch = "$env:APPDATA\Spotify\Apps\xpui\xpui.js" If (Test-Path $xpui_js_patch) { Write-Host "Обнаружен Spicetify"`n - $xpui_js = Get-Content $xpui_js_patch -Raw + $xpui_js = Get-Content $xpui_js_patch -Raw If (!($xpui_js -match 'patched by spotx')) { Copy-Item $xpui_js_patch "$xpui_js_patch.bak" - - - - $xpui_js -match 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.' | Out-Null - $menu_split_js = $Matches[0] -split 'createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.' + $new_js = $xpui_js ` - <# Removing "Upgrade button" #> -replace ">=1024", ">=1000024" ` - <# Removing an empty block #> -replace 'adsEnabled:!0', 'adsEnabled:!1' ` - <# Removing "Upgrade to premium" menu #> -replace 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.', $menu_split_js ` - <# Disabling a playlist sponsor #> -replace "allSponsorships", "" + <# Removing an empty block #> ` + -replace 'adsEnabled:!0', 'adsEnabled:!1' ` + <# Full screen mode activation and removing "Upgrade to premium" menu, upgrade button #> ` + -replace '(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"' ` + -replace '([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"' ` + <# Disabling a playlist sponsor #>` + -replace "allSponsorships", "" # Disable Podcast if ($Podcasts_off) { @@ -245,14 +244,16 @@ If (Test-Path $xpui_spa_patch) { $xpuiContents = $reader.ReadToEnd() $reader.Close() - $xpuiContents -match 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.' | Out-Null - $menu_split_js = $Matches[0] -split 'createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.' $xpuiContents = $xpuiContents ` - <# Removing "Upgrade button" #> -replace ">=1024", ">=1000024" ` - <# Removing an empty block #> -replace 'adsEnabled:!0', 'adsEnabled:!1' ` - <# Removing "Upgrade to premium" menu #> -replace 'visible:!e}[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.createElement[(]{1}[A-Za-z]{2}[,]{1}null[)]{1}[,]{1}[A-Za-z]{1}[(]{1}[)]{1}.', $menu_split_js ` - <# Disabling a playlist sponsor #> -replace "allSponsorships", "" ` - <# Disable Logging #> -replace "sp://logging/v3/\w+", "" + <# Removing an empty block #> ` + -replace 'adsEnabled:!0', 'adsEnabled:!1' ` + <# Full screen mode activation and removing "Upgrade to premium" menu, upgrade button #> ` + -replace '(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"' ` + -replace '([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"' ` + <# Disabling a playlist sponsor #>` + -replace "allSponsorships", "" ` + <# Disable Logging #>` + -replace "sp://logging/v3/\w+", "" # Disable Podcast if ($Podcasts_off) { @@ -626,4 +627,4 @@ if ($ch -eq 'u') { } } -exit +exit \ No newline at end of file diff --git a/README.md b/README.md index e300cd1..994b528 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ * For [Windows Desktop](https://www.spotify.com/download/windows/) only. (Microsoft store version is not suitable) * Blocks all banner, video and audio ads in the client * Unlocks the skip function of any track -* Blocks automatic updates (optional) +* Full screen mode activated * Podcasts disabled (optional) +* Blocks automatic updates (optional) * [Automatic cache clearing](https://github.com/amd64fox/SpotX/discussions/2) (optional) * Disabled Sentry (Prevented Sentry from sending console log/error/warning to Spotify developers) * Disabled logging (Stopped various elements to log user interaction)