From c9843beae52c13e9e58b7f2be926f6d2d6ac8b66 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Wed, 24 Jul 2024 17:39:11 -0500 Subject: [PATCH] Remove vencord plugin until Error.stack is properly proxied in UV. Make better use of the Link component I made --- public/marketplace/vencord/vencord.js | 10 ------- public/sw.js | 11 +------- .../SettingsContent/CreditsTab.astro | 17 ++++++------ src/components/UI/Footer.astro | 12 ++++----- src/components/UI/Header.astro | 26 ++++++++++++------- src/components/UI/Link.astro | 4 +-- src/json/marketplace.json | 9 ------- src/pages/[lang]/index.astro | 2 +- src/pages/[lang]/settings.astro | 7 ++--- 9 files changed, 39 insertions(+), 59 deletions(-) delete mode 100644 public/marketplace/vencord/vencord.js diff --git a/public/marketplace/vencord/vencord.js b/public/marketplace/vencord/vencord.js deleted file mode 100644 index 6af590d..0000000 --- a/public/marketplace/vencord/vencord.js +++ /dev/null @@ -1,10 +0,0 @@ -// async function applyCSS() { -// let vencordCSS = await fetch("https://raw.githubusercontent.com/Vencord/builds/main/browser.css") -// let cssLink = document.createElement("style"); - -// cssLink.innerHTML = await vencordCSS.text(); -// document.head.appendChild(cssLink) -// } -// applyCSS(); - -// document.head.appendChild(document.createElement("script")).src = "https://raw.githubusercontent.com/Vencord/builds/main/browser.js"; \ No newline at end of file diff --git a/public/sw.js b/public/sw.js index df934cf..ae86a37 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,19 +1,11 @@ importScripts("/uv/uv.bundle.js", "/uv.config.js", "/workerware/workerware.js"); importScripts( __uv$config.sw); +importScripts("/marketplace/scriptInjector/index.js") const ww = new WorkerWare({ debug: false, }); -self.__uv$config.inject = [{ - host: "discord.com", - html: ` - - - `, - injectTo: "head", -}]; - function loadExtensionScripts() { try { @@ -27,7 +19,6 @@ function loadExtensionScripts() { extensions.forEach((extension) => { if (extension.type != "serviceWorker") return; // Loads the function to be added as a middleware into global scope. - // The function defined should NOT immediately execute any function. eval(atob(extension.scriptCopy)); ww.use({ function: self[extension.entryNamespace][extension.entryFunc], diff --git a/src/components/SettingsContent/CreditsTab.astro b/src/components/SettingsContent/CreditsTab.astro index fef6e94..37c6418 100644 --- a/src/components/SettingsContent/CreditsTab.astro +++ b/src/components/SettingsContent/CreditsTab.astro @@ -1,4 +1,5 @@ --- +import Link from "@components/UI/Link.astro"; import { i18n } from "@i18n/utils"; const t = i18n.inferLangUseTranslations(Astro.url); --- @@ -6,27 +7,25 @@ const t = i18n.inferLangUseTranslations(Astro.url);

- {t("ultraviolet")} - Titanium Network + {t("ultraviolet")} - Titanium Network

- {t("settings.credits.japaneseTranslations")} - wearr + {t("settings.credits.japaneseTranslations")} - wearr

- {t("settings.credits.mochaandmacchiatothemes")} - Catppuccin + {t("settings.credits.mochaandmacchiatothemes")} - Catppuccin

- Rosé Pine Theme - Rosé Pine + Wisp Server - Mercury Workshop +

+

+ Rosé Pine Theme - Rosé Pine

diff --git a/src/components/UI/Footer.astro b/src/components/UI/Footer.astro index 9d41f80..101a9cd 100644 --- a/src/components/UI/Footer.astro +++ b/src/components/UI/Footer.astro @@ -15,14 +15,14 @@ const t = i18n.inferLangUseTranslations(Astro.url);