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:
sadan4 2025-04-04 16:46:01 -04:00 committed by GitHub
parent eeea8d9291
commit 478699d1b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 12 additions and 19 deletions

View file

@ -117,6 +117,7 @@ export default definePlugin({
this.settings.store.whitelistedLoggers?.split(";").map(x => x.trim()).forEach(logAllow.add.bind(logAllow));
},
Noop,
NoopLogger: () => NoopLogger,
shouldLog(logger: string, level: keyof AllowLevels) {
@ -148,15 +149,15 @@ export default definePlugin({
{
find: "is not a valid locale.",
replacement: {
match: /\i\.error\(""\.concat\(\i," is not a valid locale."\)\);/,
replace: ""
match: /\i\.error(?=\(""\.concat\(\i," is not a valid locale."\)\))/,
replace: "$self.Noop"
}
},
{
find: '"AppCrashedFatalReport: getLastCrash not supported."',
replacement: {
match: /console\.log\("AppCrashedFatalReport: getLastCrash not supported\."\);/,
replace: ""
match: /console\.log(?=\("AppCrashedFatalReport: getLastCrash not supported\."\))/,
replace: "$self.Noop"
}
},
{

View file

@ -47,19 +47,11 @@ export default definePlugin({
{
match: /\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/,
replace: "$self.handleOnline()"
},
{
match: /(setInterval\(\i,\.25\*)\i\.\i/,
replace: "$1$self.getIntervalDelay()" // For web installs
}
]
}
],
getIntervalDelay() {
return Math.min(6e5, this.getIdleTimeout());
},
handleOnline() {
if (!settings.store.remainInIdle) {
FluxDispatcher.dispatch({

View file

@ -19,7 +19,7 @@ import { AvatarDecorationModalPreview } from "../components";
const FileUpload = findComponentByCodeLazy("fileUploadInput,");
const { HelpMessage, HelpMessageTypes } = mapMangledModuleLazy('POSITIVE=3]="POSITIVE', {
const { HelpMessage, HelpMessageTypes } = mapMangledModuleLazy('POSITIVE="positive', {
HelpMessageTypes: filters.byProps("POSITIVE", "WARNING", "INFO"),
HelpMessage: filters.byCode(".iconDiv")
});

View file

@ -66,8 +66,8 @@ export default definePlugin({
{
find: '="SYSTEM_TAG"',
replacement: {
match: /(?<=\i.gradientClassName]\),style:.{0,80}:void 0,)/,
replace: "style:{color:$self.calculateNameColorForMessageContext(arguments[0])},"
match: /\i.gradientClassName]\),style:/,
replace: "$&{color:$self.calculateNameColorForMessageContext(arguments[0])},_style:"
}
},
{

View file

@ -401,7 +401,7 @@ export default definePlugin({
{
// Updated message transformer(?)
find: "THREAD_STARTER_MESSAGE?null===",
find: "THREAD_STARTER_MESSAGE?null==",
replacement: [
{
// Pass through editHistory & deleted & original attachments to the "edited message" transformer

View file

@ -128,7 +128,7 @@ export default definePlugin({
{
find: ",acceptInvite(",
replacement: {
match: /INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,
match: /INVITE_ACCEPT_SUCCESS.+?,(\i)=null!=.+?;/,
replace: (m, guildId) => `${m}$self.applyDefaultSettings(${guildId});`
}
},

View file

@ -28,11 +28,11 @@ export default definePlugin({
find: ".nsfwAllowed=null",
replacement: [
{
match: /(?<=\.nsfwAllowed=)null!==.+?(?=[,;])/,
match: /(?<=\.nsfwAllowed=)null!=.+?(?=[,;])/,
replace: "true",
},
{
match: /(?<=\.ageVerificationStatus=)null!==.+?(?=[,;])/,
match: /(?<=\.ageVerificationStatus=)null!=.+?(?=[,;])/,
replace: "3", // VERIFIED_ADULT
}
],