PlatformSpoofer: Fix Broken Spoofing
This commit is contained in:
parent
3a5bd94de0
commit
dd71aaa31f
1 changed files with 10 additions and 11 deletions
|
|
@ -62,18 +62,17 @@ export default definePlugin({
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "_doIdentify(){",
|
find: "_doIdentify(){",
|
||||||
replacement: {
|
replacement: [
|
||||||
match: /(\[IDENTIFY\].*let.{0,5}=\{.*properties:)(.*),presence/,
|
{
|
||||||
replace: "$1{...$2,...$self.getPlatform(true)},presence"
|
match: /window._ws=null,null!=\i/,
|
||||||
}
|
replace: "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: /(?<="GatewaySocket"\)\}\),properties:)(\i)/,
|
||||||
|
replace: "{...$1,...$self.getPlatform(true)}"
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
find: '("AppSkeleton");',
|
|
||||||
replacement: {
|
|
||||||
match: /(?<=\.isPlatformEmbedded.{0,50}\i\)\)\}.{0,30})\i\?\i\.\i\.set\(.{0,10}:/,
|
|
||||||
replace: ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
getPlatform(bypass, userId?: any) {
|
getPlatform(bypass, userId?: any) {
|
||||||
const platform = settings.store.platform ?? "desktop";
|
const platform = settings.store.platform ?? "desktop";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue