fix(FakeNitro): more reliable patches (#304)
This commit is contained in:
parent
f2e0542614
commit
ebb8da0f23
@ -71,8 +71,8 @@ export default definePlugin({
|
|||||||
"canUseEmojisEverywhere"
|
"canUseEmojisEverywhere"
|
||||||
].map(func => {
|
].map(func => {
|
||||||
return {
|
return {
|
||||||
match: new RegExp(`${func}:function\\(.+?}`),
|
match: new RegExp(`${func}:function\\(.+?\\{`),
|
||||||
replace: `${func}:function(e){return true;}`
|
replace: "$&return true;"
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -80,8 +80,8 @@ export default definePlugin({
|
|||||||
find: "canUseAnimatedEmojis:function",
|
find: "canUseAnimatedEmojis:function",
|
||||||
predicate: () => Settings.plugins.FakeNitro.enableStickerBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableStickerBypass === true,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /canUseStickersEverywhere:function\(.+?}/,
|
match: /canUseStickersEverywhere:function\(.+?\{/,
|
||||||
replace: "canUseStickersEverywhere:function(e){return true;}"
|
replace: "$&return true;"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -101,8 +101,8 @@ export default definePlugin({
|
|||||||
"canStreamMidQuality"
|
"canStreamMidQuality"
|
||||||
].map(func => {
|
].map(func => {
|
||||||
return {
|
return {
|
||||||
match: new RegExp(`${func}:function\\(.+?}`),
|
match: new RegExp(`${func}:function\\(.+?\\{`),
|
||||||
replace: `${func}:function(e){return true;}`
|
replace: "$&return true;"
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user