ForcedExp patch backward compatibility

#678
This commit is contained in:
amd64fox
2025-02-07 22:32:28 +03:00
parent 743e6113c2
commit 7448c439d6

View File

@@ -75,7 +75,7 @@
"to": ""
},
"match": "((?:{configuration|{resolver|instance):(.).(?:getRemoteConfig|getUrlDispenserServiceClient).+?;)",
"replace": "$1const experiments={enable:[],disable:[],custom:[]},setExpValue=(v,e,val)=>v&&(v.set?v.set(e,val):v[e]&&(v[e].value=val)),config=e.getRemoteConfigResolver?.()||e.getRemoteConfiguration?.();config&&((values=>{for(const type in experiments)experiments[type].forEach(exp=>setExpValue(values,type==='custom'?exp.name:exp,type==='enable'));(window.Spotx??={}).RemoteExp=values})(config.values||config.activeProperties));"
"replace": "$1const experiments={enable:[],disable:[],custom:[]},setExpValue=(v,e,val)=>v&&(v.set?v.set(e,val):v[e]&&(v[e].value=val)),config=$2.getRemoteConfigResolver?.()||$2.getRemoteConfiguration?.();config&&((values=>{for(const type in experiments)experiments[type].forEach(exp=>setExpValue(values,type==='custom'?exp.name:exp,type==='enable'));(window.Spotx??={}).RemoteExp=values})(config.values||config.activeProperties));"
},
"DisableExp": {
"InAppMessaging": {