mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 02:47:03 -04:00
Fix broken stuff for discord update (#3349)
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com> Co-authored-by: Vending Machine <vendicated@riseup.net>
This commit is contained in:
parent
eeea8d9291
commit
478699d1b0
7 changed files with 12 additions and 19 deletions
|
@ -117,6 +117,7 @@ export default definePlugin({
|
||||||
this.settings.store.whitelistedLoggers?.split(";").map(x => x.trim()).forEach(logAllow.add.bind(logAllow));
|
this.settings.store.whitelistedLoggers?.split(";").map(x => x.trim()).forEach(logAllow.add.bind(logAllow));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Noop,
|
||||||
NoopLogger: () => NoopLogger,
|
NoopLogger: () => NoopLogger,
|
||||||
|
|
||||||
shouldLog(logger: string, level: keyof AllowLevels) {
|
shouldLog(logger: string, level: keyof AllowLevels) {
|
||||||
|
@ -148,15 +149,15 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "is not a valid locale.",
|
find: "is not a valid locale.",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /\i\.error\(""\.concat\(\i," is not a valid locale."\)\);/,
|
match: /\i\.error(?=\(""\.concat\(\i," is not a valid locale."\)\))/,
|
||||||
replace: ""
|
replace: "$self.Noop"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: '"AppCrashedFatalReport: getLastCrash not supported."',
|
find: '"AppCrashedFatalReport: getLastCrash not supported."',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /console\.log\("AppCrashedFatalReport: getLastCrash not supported\."\);/,
|
match: /console\.log(?=\("AppCrashedFatalReport: getLastCrash not supported\."\))/,
|
||||||
replace: ""
|
replace: "$self.Noop"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,19 +47,11 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
match: /\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/,
|
match: /\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/,
|
||||||
replace: "$self.handleOnline()"
|
replace: "$self.handleOnline()"
|
||||||
},
|
|
||||||
{
|
|
||||||
match: /(setInterval\(\i,\.25\*)\i\.\i/,
|
|
||||||
replace: "$1$self.getIntervalDelay()" // For web installs
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
getIntervalDelay() {
|
|
||||||
return Math.min(6e5, this.getIdleTimeout());
|
|
||||||
},
|
|
||||||
|
|
||||||
handleOnline() {
|
handleOnline() {
|
||||||
if (!settings.store.remainInIdle) {
|
if (!settings.store.remainInIdle) {
|
||||||
FluxDispatcher.dispatch({
|
FluxDispatcher.dispatch({
|
||||||
|
|
|
@ -19,7 +19,7 @@ import { AvatarDecorationModalPreview } from "../components";
|
||||||
|
|
||||||
const FileUpload = findComponentByCodeLazy("fileUploadInput,");
|
const FileUpload = findComponentByCodeLazy("fileUploadInput,");
|
||||||
|
|
||||||
const { HelpMessage, HelpMessageTypes } = mapMangledModuleLazy('POSITIVE=3]="POSITIVE', {
|
const { HelpMessage, HelpMessageTypes } = mapMangledModuleLazy('POSITIVE="positive', {
|
||||||
HelpMessageTypes: filters.byProps("POSITIVE", "WARNING", "INFO"),
|
HelpMessageTypes: filters.byProps("POSITIVE", "WARNING", "INFO"),
|
||||||
HelpMessage: filters.byCode(".iconDiv")
|
HelpMessage: filters.byCode(".iconDiv")
|
||||||
});
|
});
|
||||||
|
|
|
@ -66,8 +66,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: '="SYSTEM_TAG"',
|
find: '="SYSTEM_TAG"',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=\i.gradientClassName]\),style:.{0,80}:void 0,)/,
|
match: /\i.gradientClassName]\),style:/,
|
||||||
replace: "style:{color:$self.calculateNameColorForMessageContext(arguments[0])},"
|
replace: "$&{color:$self.calculateNameColorForMessageContext(arguments[0])},_style:"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -401,7 +401,7 @@ export default definePlugin({
|
||||||
|
|
||||||
{
|
{
|
||||||
// Updated message transformer(?)
|
// Updated message transformer(?)
|
||||||
find: "THREAD_STARTER_MESSAGE?null===",
|
find: "THREAD_STARTER_MESSAGE?null==",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
// Pass through editHistory & deleted & original attachments to the "edited message" transformer
|
// Pass through editHistory & deleted & original attachments to the "edited message" transformer
|
||||||
|
|
|
@ -128,7 +128,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ",acceptInvite(",
|
find: ",acceptInvite(",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,
|
match: /INVITE_ACCEPT_SUCCESS.+?,(\i)=null!=.+?;/,
|
||||||
replace: (m, guildId) => `${m}$self.applyDefaultSettings(${guildId});`
|
replace: (m, guildId) => `${m}$self.applyDefaultSettings(${guildId});`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -28,11 +28,11 @@ export default definePlugin({
|
||||||
find: ".nsfwAllowed=null",
|
find: ".nsfwAllowed=null",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=\.nsfwAllowed=)null!==.+?(?=[,;])/,
|
match: /(?<=\.nsfwAllowed=)null!=.+?(?=[,;])/,
|
||||||
replace: "true",
|
replace: "true",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /(?<=\.ageVerificationStatus=)null!==.+?(?=[,;])/,
|
match: /(?<=\.ageVerificationStatus=)null!=.+?(?=[,;])/,
|
||||||
replace: "3", // VERIFIED_ADULT
|
replace: "3", // VERIFIED_ADULT
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue