mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-26 06:38:24 -04:00
by crxa's order x2
This commit is contained in:
parent
507edbbe5b
commit
078eba2f02
8 changed files with 402 additions and 15 deletions
|
@ -50,4 +50,4 @@ export default definePlugin({
|
|||
|
||||
if (this.css) this.css.remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
import FriendCodesPanel from "./FriendCodesPanel";
|
||||
import { Devs } from "@utils/constants";
|
||||
|
||||
export default definePlugin({
|
||||
name: "FriendCodes",
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
import "./styles.css";
|
||||
|
||||
import { classNameFactory } from "@api/Styles";
|
||||
import { proxyLazy } from "@utils/lazy";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { Forms } from "@webpack/common";
|
||||
import { ComponentType, HTMLAttributes } from "react";
|
||||
|
||||
export enum SpinnerTypes {
|
||||
|
|
|
@ -255,7 +255,7 @@ export default definePlugin({
|
|||
replacement: {
|
||||
match: /(?<=className:\i\}\))/,
|
||||
replace: ",onClick:()=>$self.openCompleteQuestUI()"
|
||||
},
|
||||
},
|
||||
predicate: () => settings.store.clickableQuestDiscovery
|
||||
}
|
||||
],
|
||||
|
|
|
@ -48,11 +48,11 @@ export async function fetchImageAsBlob(url: string): Promise<Blob> {
|
|||
if (!url) throw new Error("Invalid URL: URL is empty or undefined");
|
||||
|
||||
const response = await fetch(url, {
|
||||
mode: 'cors',
|
||||
cache: 'no-cache',
|
||||
credentials: 'same-origin',
|
||||
mode: "cors",
|
||||
cache: "no-cache",
|
||||
credentials: "same-origin",
|
||||
headers: {
|
||||
'Accept': 'image/*'
|
||||
"Accept": "image/*"
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -72,7 +72,7 @@ export async function fetchImageAsBlob(url: string): Promise<Blob> {
|
|||
0x05, 0x00, 0x01, 0x0D, 0x0A, 0x2D, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE,
|
||||
0x42, 0x60, 0x82
|
||||
])
|
||||
], { type: 'image/png' });
|
||||
], { type: "image/png" });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import {
|
|||
UserStore,
|
||||
} from "@webpack/common";
|
||||
|
||||
///
|
||||
// /
|
||||
// Create an in-memory cache (temporary, lost on restart)
|
||||
const ttsCache = new Map<string, string>();
|
||||
|
||||
|
@ -68,7 +68,7 @@ async function setCachedVoiceInDB(cacheKey: string, blob: Blob): Promise<void> {
|
|||
});
|
||||
}
|
||||
|
||||
///
|
||||
// /
|
||||
interface VoiceState {
|
||||
userId: string;
|
||||
channelId?: string;
|
||||
|
@ -88,7 +88,7 @@ const VoiceStateStore = findByPropsLazy(
|
|||
// Filtering out events is not as simple as just dropping duplicates, as otherwise mute, unmute, mute would
|
||||
// not say the second mute, which would lead you to believe they're unmuted
|
||||
|
||||
///
|
||||
// /
|
||||
async function speak(text: string) {
|
||||
if (text.trim().length === 0) return;
|
||||
|
||||
|
@ -169,7 +169,7 @@ async function speak(text: string) {
|
|||
audio.play();
|
||||
}
|
||||
|
||||
///
|
||||
// /
|
||||
function clean(str: string) {
|
||||
const replacer = settings.store.latinOnly
|
||||
? /[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue