Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
hellsuck authored Dec 13, 2024
1 parent 76a286b commit 0765159
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/fakeNitro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ function makeBypassPatches(): Omit<Patch, "plugin"> {
return {
find: "canUseCustomStickersEverywhere:",
replacement: mapping.map(({ func, predicate }) => ({
match: new RegExp(String.raw`(?<=${func}:function\(\i(?:,\i)?\){)`),
replace: "return true;",
match: new RegExp(String.raw`(?<=${func}:)\i`),
replace: "() => true",
predicate
}))
};
Expand Down Expand Up @@ -297,8 +297,8 @@ export default definePlugin({
replacement: [
{
// Overwrite incoming connection settings proto with our local settings
match: /CONNECTION_OPEN:function\((\i)\){/,
replace: (m, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);`
match: /function (\i)\((\i)\){(?=.*CONNECTION_OPEN:\1)/,
replace: (m, funcName, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);`
},
{
// Overwrite non local proto changes with our local settings
Expand Down

0 comments on commit 0765159

Please sign in to comment.