mirror of
https://github.com/Equicord/Equicord.git
synced 2025-04-01 13:11:57 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
534e940f1b
3 changed files with 9 additions and 9 deletions
|
@ -124,7 +124,7 @@ if (IS_VESKTOP || !IS_VANILLA) {
|
||||||
// TODO: Restrict this to only imported packages with fixed version.
|
// TODO: Restrict this to only imported packages with fixed version.
|
||||||
// Perhaps auto generate with esbuild
|
// Perhaps auto generate with esbuild
|
||||||
csp["script-src"] ??= [];
|
csp["script-src"] ??= [];
|
||||||
csp["script-src"].push("'unsafe-eval'", "https://unpkg.com", "https://cdnjs.cloudflare.com");
|
csp["script-src"].push("'unsafe-eval'", "https://cdn.jsdelivr.net", "https://cdnjs.cloudflare.com");
|
||||||
headers[header] = [stringifyPolicy(csp)];
|
headers[header] = [stringifyPolicy(csp)];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -63,11 +63,11 @@ export default definePlugin({
|
||||||
|
|
||||||
stringDelta(delta: number, showMillis: boolean) {
|
stringDelta(delta: number, showMillis: boolean) {
|
||||||
const diff: Diff = {
|
const diff: Diff = {
|
||||||
days: Math.round(delta / (60 * 60 * 24 * 1000)),
|
days: Math.floor(delta / (60 * 60 * 24 * 1000)),
|
||||||
hours: Math.round((delta / (60 * 60 * 1000)) % 24),
|
hours: Math.floor((delta / (60 * 60 * 1000)) % 24),
|
||||||
minutes: Math.round((delta / (60 * 1000)) % 60),
|
minutes: Math.floor((delta / (60 * 1000)) % 60),
|
||||||
seconds: Math.round(delta / 1000 % 60),
|
seconds: Math.floor(delta / 1000 % 60),
|
||||||
milliseconds: Math.round(delta % 1000)
|
milliseconds: Math.floor(delta % 1000)
|
||||||
};
|
};
|
||||||
|
|
||||||
const str = (k: DiffKey) => diff[k] > 0 ? `${diff[k]} ${diff[k] > 1 ? k : k.substring(0, k.length - 1)}` : null;
|
const str = (k: DiffKey) => diff[k] > 0 ? `${diff[k]} ${diff[k] > 1 ? k : k.substring(0, k.length - 1)}` : null;
|
||||||
|
|
|
@ -72,11 +72,11 @@ export interface ApngFrameData {
|
||||||
// The below code is only used on the Desktop (electron) build of Vencord.
|
// The below code is only used on the Desktop (electron) build of Vencord.
|
||||||
// Browser (extension) builds do not contain these remote imports.
|
// Browser (extension) builds do not contain these remote imports.
|
||||||
|
|
||||||
export const shikiWorkerSrc = `https://unpkg.com/@vap/shiki-worker@0.0.8/dist/${IS_DEV ? "index.js" : "index.min.js"}`;
|
export const shikiWorkerSrc = `https://cdn.jsdelivr.net/npm/@vap/shiki-worker@0.0.8/dist/${IS_DEV ? "index.js" : "index.min.js"}`;
|
||||||
export const shikiOnigasmSrc = "https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm";
|
export const shikiOnigasmSrc = "https://cdn.jsdelivr.net/npm/@vap/shiki@0.10.3/dist/onig.wasm";
|
||||||
|
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
export const getStegCloak = /* #__PURE__*/ makeLazy(() => import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"));
|
export const getStegCloak = /* #__PURE__*/ makeLazy(() => import("https://cdn.jsdelivr.net/npm/stegcloak-dist@1.0.0/index.js"));
|
||||||
|
|
||||||
export const getStylus = /* #__PURE__*/ makeLazy(async () => {
|
export const getStylus = /* #__PURE__*/ makeLazy(async () => {
|
||||||
const stylusScript = await fetch("https://unpkg.com/stylus-lang-bundle@0.58.1/dist/stylus-renderer.min.js").then(r => r.text());
|
const stylusScript = await fetch("https://unpkg.com/stylus-lang-bundle@0.58.1/dist/stylus-renderer.min.js").then(r => r.text());
|
||||||
|
|
Loading…
Add table
Reference in a new issue