mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-28 07:54:22 -04:00
Fix AllCallTimers + Bring Back WebpackTarball
This commit is contained in:
parent
cb6a8502fd
commit
f4f817eaed
5 changed files with 315 additions and 5 deletions
|
@ -17,7 +17,7 @@ export const settings = definePluginSettings({
|
|||
showWithoutHover: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Always show the timer without needing to hover",
|
||||
restartNeeded: false,
|
||||
restartNeeded: true,
|
||||
default: true
|
||||
},
|
||||
showRoleColor: {
|
||||
|
@ -106,6 +106,17 @@ export default definePlugin({
|
|||
patches: [
|
||||
{
|
||||
find: ".usernameSpeaking]",
|
||||
predicate: () => !settings.store.showWithoutHover,
|
||||
replacement: [
|
||||
{
|
||||
match: /(?<=user:(\i).*?)iconGroup,children:\[/,
|
||||
replace: "$&$self.renderTimer($1.id),"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
find: ".usernameSpeaking]",
|
||||
predicate: () => settings.store.showWithoutHover,
|
||||
replacement: [
|
||||
{
|
||||
match: /function\(\)\{.+:""(?=.*?userId:(\i))/,
|
||||
|
@ -217,9 +228,6 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
renderTimer(userId: string) {
|
||||
if (!settings.store.showWithoutHover) {
|
||||
return "";
|
||||
}
|
||||
// get the user join time from the users object
|
||||
const joinTime = userJoinTimes.get(userId);
|
||||
if (!joinTime?.time) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue