fix RoleColorEverywhere (#3370)

This commit is contained in:
sadan4 2025-04-10 10:45:22 -04:00 committed by GitHub
parent 8ad33db6c2
commit 3dd58c2551
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,13 +84,7 @@ export default definePlugin({
find: ".USER_MENTION)", find: ".USER_MENTION)",
replacement: [ replacement: [
{ {
// FIXME(Bundler spread transform related): Remove old compatiblity once enough time has passed, if they don't revert match: /(?<=onContextMenu:\i,color:)\i(?=,onClick)(?<=user:(\i),channel:(\i).+?)/,
match: /onContextMenu:\i,color:\i,\.\.\.\i(?=,children:)(?<=user:(\i),channel:(\i).{0,500}?)/,
replace: "$&,color:$self.getColorInt($1?.id,$2?.id)",
noWarn: true
},
{
match: /(?<=onContextMenu:\i,color:)\i(?=\},\i\),\{children)(?<=user:(\i),channel:(\i).{0,500}?)/,
replace: "$self.getColorInt($1?.id,$2?.id)", replace: "$self.getColorInt($1?.id,$2?.id)",
} }
], ],