Actually have the damn build work

This commit is contained in:
MotorTruck1221 2024-10-24 03:09:23 -06:00
parent aae0bd2420
commit 4d4ebf2d09
No known key found for this signature in database
GPG key ID: 08F417E2B8B61EA4
4 changed files with 4 additions and 26 deletions

View file

@ -1,11 +0,0 @@
async function loadVencord() {
const loadCss = await fetch("https://raw.githubusercontent.com/Vencord/builds/main/browser.css");
const css = await loadCss.text();
return {
host: 'discord.com',
html: `<style>${css}</script>`,
injectTo: 'head'
}
}
self.entryFunc = loadVencord;

View file

@ -73,18 +73,7 @@ async function setupDB(db: ModelStatic<CatalogModel>) {
tags: ["Theme", "Simple", "Dark", "Retro"],
payload: "retro.css",
type: "theme",
},
{
package_name: "com.nebula.darkMode",
title: "Dark Mode",
image: "dark.png",
author: "Nebula Services",
version: "1.0.0",
description: "Force dark mode on all websites",
tags: ["Plugin", "Dark Mode", "Noctura"],
payload: "index.js",
type: "plugin",
}
}
];
const dbItems = await db.findAll();
if (dbItems.length === 0) {

View file

@ -17,8 +17,8 @@ export const prerender = true;
pageLoad(async () => {
const iframe = document.getElementById("chango") as HTMLIFrameElement;
if (iframe) {
initSw().then(() => {
setTransport(localStorage.getItem(Settings.ProxySettings.transport) as string).then(async () => {
initSw().then((init) => {
setTransport(init.conn, localStorage.getItem(Settings.ProxySettings.transport) as string).then(async () => {
iframe.src = __uv$config!.prefix + __uv$config.encodeUrl!("https://radon.games");
});
});

View file

@ -85,7 +85,7 @@ const marketPlaceSettings = {
if (plugin.type === "page") {
const pluginScript = await fetch(`/packages/${plugin.name}/${plugin.src}`).then((res) => res.text());
const script = eval(pluginScript);
const inject = script() as unknown as SWPlugin;
const inject = await script() as unknown as SWPlugin;
if (plugin.remove) {
const idx = plugins.indexOf(plugin.name);
worker.active?.postMessage([{remove: true, host: inject.host, html: inject.html, injectTo: inject.injectTo}] as SWPlugin[]);