mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-30 12:11:58 -04:00
Move unpkg to jsdelivr
This commit is contained in:
parent
d797cab56a
commit
58929b630d
3 changed files with 6 additions and 6 deletions
File diff suppressed because one or more lines are too long
|
@ -7,8 +7,8 @@
|
|||
import { makeLazy } from "@utils/lazy";
|
||||
import { useEffect, useState } from "@webpack/common";
|
||||
|
||||
const SCRIPT_URL = "https://unpkg.com/katex@0.16.9/dist/katex.mjs";
|
||||
const STYLE_URL = "https://unpkg.com/katex@0.16.9/dist/katex.min.css";
|
||||
const SCRIPT_URL = "https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.mjs";
|
||||
const STYLE_URL = "https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css";
|
||||
|
||||
let theKatex: undefined | any = undefined;
|
||||
export const loadKatex = makeLazy(async () => {
|
||||
|
|
|
@ -79,7 +79,7 @@ export const shikiOnigasmSrc = "https://cdn.jsdelivr.net/npm/@vap/shiki@0.10.3/d
|
|||
export const getStegCloak = /* #__PURE__*/ makeLazy(() => import("https://cdn.jsdelivr.net/npm/stegcloak-dist@1.0.0/index.js"));
|
||||
|
||||
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://cdn.jsdelivr.net/npm/stylus-lang-bundle@0.58.1/dist/stylus-renderer.min.js").then(r => r.text());
|
||||
// the stylus bundle doesn't have a header that checks for export conditions so we can just patch the script to
|
||||
// return the renderer itself
|
||||
const patchedScript = stylusScript.replace("var StylusRenderer=", "return ");
|
||||
|
@ -87,7 +87,7 @@ export const getStylus = /* #__PURE__*/ makeLazy(async () => {
|
|||
});
|
||||
|
||||
export const getLess = /* #__PURE__*/ makeLazy(async () => {
|
||||
const lessScript = await fetch("https://unpkg.com/less@4.2.0/dist/less.min.js").then(r => r.text());
|
||||
const lessScript = await fetch("https://cdn.jsdelivr.net/npm/less@4.2.0/dist/less.min.js").then(r => r.text());
|
||||
const module = { exports: {} };
|
||||
Function("module", "exports", lessScript)(module, module.exports);
|
||||
return module.exports as LessStatic;
|
||||
|
|
Loading…
Add table
Reference in a new issue