Skip to content

Commit

Permalink
Enabled dev tools
Browse files Browse the repository at this point in the history
- added a switch in the main settings that activates developer tools #439
  • Loading branch information
amd64fox committed Nov 12, 2023
1 parent 77764d6 commit 208dcea
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions patches/patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"to": ""
},
"match": "(configuration:(.).getRemoteConfiguration.+?;)",
"replace": "$1const EnableExp=[],DisableExp=[],CustomExp=[],allExperiments=[EnableExp,DisableExp,CustomExp];allExperiments.forEach((expArray)=>{const values=$2.getRemoteConfiguration()?.values;if(values){expArray.forEach((exp)=>{if(expArray===EnableExp||expArray===DisableExp){values.set(exp,expArray===EnableExp);}else if(expArray===CustomExp){values.set(exp.name,exp.value);}});window.RemoteExp=values}});"
"replace": "$1const EnableExp=[],DisableExp=[],CustomExp=[],allExperiments=[EnableExp,DisableExp,CustomExp];allExperiments.forEach((expArray)=>{const values=$2.getRemoteConfiguration()?.values;if(values){expArray.forEach((exp)=>{if(expArray===EnableExp||expArray===DisableExp){values.set(exp,expArray===EnableExp);}else if(expArray===CustomExp){values.set(exp.name,exp.value);}});(window.Spotx??={}).RemoteExp=values}});"
},
"DisableExp": {
"InAppMessaging": {
Expand Down Expand Up @@ -1283,6 +1283,28 @@
"add": "ads:'0',catalogue:'premium',product:'premium',type:'premium',name:'Spotify','unrestricted':'1'",
"add2": "'storage-size-config':'{0},90,500,3'"
},
"dev-tools": {
"version": {
"fr": "1.1.98",
"to": ""
},
"match": [
"(onSelected:).(=>{..\"app.enable.developer.mode.,)..}",
"(.)\\){(this._cosmos=.,this._product_state)",
"(..\\(.\\))(\\?(..createElement|\\(.{1,7}jsxs\\))\\(.{1,3},{filterMatchQuery:.{2,15}\\(\"settings.employee\"\\))",
"(\"desktop.settings.language-override\".+?)(\\w\\.\\w*\\(..,null\\),|\\w\\.jsx\\)\\(..,\\{}\\),\\(\\d,)",
"(\"Debug Window\")(.*?\"Locales\")",
"desktop.settings.language-override"
],
"replace": [
"$1(check)$2check);localStorage.setItem('dev-tools',check);Spotx.ProductState.putOverridesValues({pairs:{'com.spotify.madprops.use.ucs.product.state':check?'1':'0','employee':check?'1':'0'}});setTimeout(()=>{window.sendCosmosRequest({ request:JSON.stringify({method:'POST',uri:'sp://desktop/v1/restart'})})},500);}",
"$1){window.Spotx={ProductState:$1};if(localStorage.getItem('dev-tools')==='true'){$1.putOverridesValues({pairs:{'com.spotify.madprops.use.ucs.product.state':'1','employee': '1'}})};$2",
"true$2",
"$1",
"$1",
""
]
},
"podcast_page_banner": {
"version": {
"fr": "1.1.70",
Expand Down Expand Up @@ -1356,4 +1378,4 @@
"replace": "min:250,max:400"
}
}
}
}

0 comments on commit 208dcea

Please sign in to comment.