diff options
author | V <vendicated@riseup.net> | 2023-09-19 04:07:24 +0200 |
---|---|---|
committer | V <vendicated@riseup.net> | 2023-09-19 04:11:27 +0200 |
commit | 41f5d71e38f785786656e111cf2ea1200e45886d (patch) | |
tree | 564a0300485de18a0b8d396118f09c6f756105ed /browser/VencordNativeStub.ts | |
parent | efb88a4df8037fc1394a9e2053c49e75d340f401 (diff) | |
download | Vencord-41f5d71e38f785786656e111cf2ea1200e45886d.tar.gz Vencord-41f5d71e38f785786656e111cf2ea1200e45886d.tar.bz2 Vencord-41f5d71e38f785786656e111cf2ea1200e45886d.zip |
Bundle dependencies with extensions for webstore rule compliance (#1740)
Diffstat (limited to 'browser/VencordNativeStub.ts')
-rw-r--r-- | browser/VencordNativeStub.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/browser/VencordNativeStub.ts b/browser/VencordNativeStub.ts index 664e9ee..e3df0d6 100644 --- a/browser/VencordNativeStub.ts +++ b/browser/VencordNativeStub.ts @@ -19,9 +19,11 @@ /// <reference path="../src/modules.d.ts" /> /// <reference path="../src/globals.d.ts" /> -import monacoHtml from "~fileContent/../src/components/monacoWin.html"; +import monacoHtmlLocal from "~fileContent/monacoWin.html"; +import monacoHtmlCdn from "~fileContent/../src/main/monacoWin.html"; import * as DataStore from "../src/api/DataStore"; import { debounce } from "../src/utils"; +import { EXTENSION_BASE_URL } from "../src/utils/web-metadata"; import { getTheme, Theme } from "../src/utils/discord"; import { getThemeInfo } from "../src/main/themes"; @@ -80,6 +82,7 @@ window.VencordNative = { return; } + win.baseUrl = EXTENSION_BASE_URL; win.setCss = setCssDebounced; win.getCurrentCss = () => VencordNative.quickCss.get(); win.getTheme = () => @@ -87,7 +90,7 @@ window.VencordNative = { ? "vs-light" : "vs-dark"; - win.document.write(monacoHtml); + win.document.write(IS_EXTENSION ? monacoHtmlLocal : monacoHtmlCdn); }, }, |