diff --git a/Install.ps1 b/Install.ps1 index 6bdb269..258742a 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -1011,15 +1011,22 @@ function Helper($paramname) { $n = "xpui.js" $contents = $webjson.free.psobject.properties.name $json = $webjson.free - - $expforced = $webjson.free.forcedDisabledExp.exp + } + "forcedDisabledExp" { + # Forced disable some exp (xpui.js) + $name = "patches.json.others." + $n = "xpui.js" + $contents = "forcedDisabledExp" + $json = $webjson.others + + $expforced = $webjson.others.forcedDisabledExp.exp if (!($new_theme)) { $expforced = $expforced.Substring(0, $expforced.Length - 1) + ",'enableYLXSidebar']" } $repl = "`$1 var keys=$expforced; keys.forEach(function(key) {`$3.values.set(key, false);});`$2" - $webjson.free.forcedDisabledExp.replace = $repl + $webjson.others.forcedDisabledExp.replace = $repl } "OffPodcasts" { # Turn off podcasts @@ -1311,6 +1318,9 @@ If ($test_spa) { if (!($premium)) { extract -counts 'one' -method 'zip' -name 'xpui.js' -helper 'OffadsonFullscreen' } + + # Forced disable some exp + extract -counts 'one' -method 'zip' -name 'xpui.js' -helper 'forcedDisabledExp' # Experimental Feature if (!($exp_spotify)) { extract -counts 'one' -method 'zip' -name 'xpui.js' -helper 'ExpFeature' } diff --git a/patches/patches.json b/patches/patches.json index 1941cd8..89b09c3 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -1,5 +1,13 @@ { "free": { + "EsperantoAds": { + "version": { + "from": "1.1.93", + "do": "" + }, + "match": "(this._product_state=(.))", + "replace": "$1,$2.putOverridesValues({pairs:{ads:'0',catalogue:'premium',product:'premium',name:'Spotify'}})" + }, "bilboard": { "version": { "from": "1.1.70", @@ -11,7 +19,7 @@ "fullscreen": { "version": { "from": "1.1.58", - "do": "" + "do": "1.1.92" }, "match": "(return|.=.=>)\"free\"===(.+?)(return|.=.=>)\"premium\"===", "replace": "$1\"premium\"===$2$3\"free\"===" @@ -19,7 +27,7 @@ "audioads": { "version": { "from": "1.1.58", - "do": "" + "do": "1.1.92" }, "match": "(case .:|async enable\\(.\\){)(this.enabled=.+?\\(.{1,3},\"audio\"\\),|return this.enabled=...+?\\(.{1,3},\"audio\"\\))((;case 4:)?this.subscription=this.audioApi).+?this.onAdMessage\\)", "replace": "$1$3.cosmosConnector.increaseStreamTime(-100000000000)" @@ -27,7 +35,7 @@ "emptyblock": { "version": { "from": "1.1.58", - "do": "" + "do": "1.1.92" }, "match": "adsEnabled:!0", "replace": "adsEnabled:!1" @@ -40,15 +48,6 @@ "match": "allSponsorships", "replace": "" }, - "forcedDisabledExp": { - "version": { - "from": "1.1.92", - "do": "" - }, - "match": "(VK.fromJSON\\(.\\)\\);)(return.+value:{localConfiguration:(.))", - "exp": "['enableInAppMessaging','Enable pick and shuffle','enableDesktopMusicLeavebehinds','enableHptoLocationRefactor','enableUserFraudSignals','enableUserFraudVerificationRequest','enableUserFraudVerification','enableEsperantoMigration']", - "replace": "" - }, "connectold": { "version": { "from": "1.1.70", @@ -99,6 +98,15 @@ "match": "((..createElement|children:\\(.{1,7}\\))\\(....,{source:).....get\\(\"about.copyright\",.\\),paragraphClassName:.}\\)", "replace": "$1\"