CustomTimestamps: Fix Crashing

This commit is contained in:
thororen1234 2025-10-04 01:23:40 -04:00
parent 310848e0cc
commit 089cf1082c
No known key found for this signature in database
2 changed files with 5 additions and 11 deletions

View file

@ -57,13 +57,13 @@ const timeFormats: Record<string, TimeFormat> = {
sameDayFormat: {
name: "Same day",
description: "[calendar] format for today",
default: "[Today at ] HH:mm:ss",
default: "[Today at] HH:mm:ss",
offset: 0,
},
lastDayFormat: {
name: "Last day",
description: "[calendar] format for yesterday",
default: "[Yesterday at ] HH:mm:ss",
default: "[Yesterday at] HH:mm:ss",
offset: -1000 * 60 * 60 * 24,
},
lastWeekFormat: {
@ -264,8 +264,8 @@ export default definePlugin({
},
{
// Tooltips when hovering over message timestamps
match: /\(0,\i.\i\)\((\i),"LLLL"\)/,
replace: "$self.renderTimestamp($1,'tooltip')",
match: /__unsupportedReactNodeAsText:\(0,\i.\i\)\((\i),"LLLL"\)/,
replace: "text:$self.renderTimestamp($1,'tooltip')",
},
]
},

View file

@ -28,7 +28,6 @@ import { ChannelStore } from "@webpack/common";
import { convert } from "./converter";
import { conversions, ConverterAccessory, ConvertIcon } from "./ConverterAccessory";
export const settings = definePluginSettings({
myUnits: {
type: OptionType.SELECT,
@ -45,13 +44,8 @@ export const settings = definePluginSettings({
}
]
},
// invert: {
// type: OptionType.BOOLEAN,
// default: false,
// // is there a better way to word this?
// description: "If this option is set, ignore the units you set and invert every conversion."
// }
});
export default definePlugin({
name: "UnitConverter",
description: "Converts metric units to Imperal units and vice versa",