Actually have the damn build work
This commit is contained in:
parent
aae0bd2420
commit
4d4ebf2d09
4 changed files with 4 additions and 26 deletions
|
|
@ -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;
|
|
||||||
|
|
@ -73,18 +73,7 @@ async function setupDB(db: ModelStatic<CatalogModel>) {
|
||||||
tags: ["Theme", "Simple", "Dark", "Retro"],
|
tags: ["Theme", "Simple", "Dark", "Retro"],
|
||||||
payload: "retro.css",
|
payload: "retro.css",
|
||||||
type: "theme",
|
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();
|
const dbItems = await db.findAll();
|
||||||
if (dbItems.length === 0) {
|
if (dbItems.length === 0) {
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ export const prerender = true;
|
||||||
pageLoad(async () => {
|
pageLoad(async () => {
|
||||||
const iframe = document.getElementById("chango") as HTMLIFrameElement;
|
const iframe = document.getElementById("chango") as HTMLIFrameElement;
|
||||||
if (iframe) {
|
if (iframe) {
|
||||||
initSw().then(() => {
|
initSw().then((init) => {
|
||||||
setTransport(localStorage.getItem(Settings.ProxySettings.transport) as string).then(async () => {
|
setTransport(init.conn, localStorage.getItem(Settings.ProxySettings.transport) as string).then(async () => {
|
||||||
iframe.src = __uv$config!.prefix + __uv$config.encodeUrl!("https://radon.games");
|
iframe.src = __uv$config!.prefix + __uv$config.encodeUrl!("https://radon.games");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ const marketPlaceSettings = {
|
||||||
if (plugin.type === "page") {
|
if (plugin.type === "page") {
|
||||||
const pluginScript = await fetch(`/packages/${plugin.name}/${plugin.src}`).then((res) => res.text());
|
const pluginScript = await fetch(`/packages/${plugin.name}/${plugin.src}`).then((res) => res.text());
|
||||||
const script = eval(pluginScript);
|
const script = eval(pluginScript);
|
||||||
const inject = script() as unknown as SWPlugin;
|
const inject = await script() as unknown as SWPlugin;
|
||||||
if (plugin.remove) {
|
if (plugin.remove) {
|
||||||
const idx = plugins.indexOf(plugin.name);
|
const idx = plugins.indexOf(plugin.name);
|
||||||
worker.active?.postMessage([{remove: true, host: inject.host, html: inject.html, injectTo: inject.injectTo}] as SWPlugin[]);
|
worker.active?.postMessage([{remove: true, host: inject.host, html: inject.html, injectTo: inject.injectTo}] as SWPlugin[]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue