From 0fda1e46e877eb664f2252d650e96da2ebd18298 Mon Sep 17 00:00:00 2001 From: Bhsd <55071315+bhsd-harry@users.noreply.github.com> Date: Mon, 15 Jan 2024 08:51:59 +0800 Subject: [PATCH 1/2] feat(pluginStore.js): external CSS --- src/module/pluginStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module/pluginStore.js b/src/module/pluginStore.js index ee7f7bf..5c2a91c 100644 --- a/src/module/pluginStore.js +++ b/src/module/pluginStore.js @@ -36,7 +36,7 @@ export class pluginStore { */ static load(name) { if (/^https?:\/\//.test(name)) { - mw.loader.load(name) + mw.loader.load(name, /\.css$/.test(name) ? 'text/css' : undefined) console.info('[InPageEdit] 从远程加载非官方插件', name) } else { loadScript(pluginCDN + '/plugins/' + name).then( From 8725e13209707af5b0b21b939e7fe48390ecc3fb Mon Sep 17 00:00:00 2001 From: Bhsd <55071315+bhsd-harry@users.noreply.github.com> Date: Mon, 15 Jan 2024 08:59:27 +0800 Subject: [PATCH 2/2] fix(pluginStore.js): `i` flag --- src/module/pluginStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module/pluginStore.js b/src/module/pluginStore.js index 5c2a91c..b4557fa 100644 --- a/src/module/pluginStore.js +++ b/src/module/pluginStore.js @@ -36,7 +36,7 @@ export class pluginStore { */ static load(name) { if (/^https?:\/\//.test(name)) { - mw.loader.load(name, /\.css$/.test(name) ? 'text/css' : undefined) + mw.loader.load(name, /\.css$/i.test(name) ? 'text/css' : undefined) console.info('[InPageEdit] 从远程加载非官方插件', name) } else { loadScript(pluginCDN + '/plugins/' + name).then(