From 38aa80f72e9a6ed7048bb59ebbf823aa564c4e3a Mon Sep 17 00:00:00 2001 From: adryd Date: Wed, 22 Nov 2023 18:20:19 -0500 Subject: [PATCH] aaaaaaa i dont wanna rewrite half of this right now --- dist/webpackTools.user.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dist/webpackTools.user.js b/dist/webpackTools.user.js index ea531e0..76c2e69 100644 --- a/dist/webpackTools.user.js +++ b/dist/webpackTools.user.js @@ -47,7 +47,18 @@ ] }; - unsafeWindow.__webpackTools_config = configs; + let thisSiteConfig; + for (let siteConfig of configs.siteConfigs) { + if (siteConfig.matchSites?.includes(window.location.host)) { + thisSiteConfig = siteConfig; + break; + } + } + if (!thisSiteConfig) { + return; + } + + unsafeWindow.__webpackTools_siteConfig = thisSiteConfig; GM_addElement("script", { textContent: GM_getResourceText("runtimeScript"),