mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 05:59:02 +00:00
basic script loading system
// to investigate: will the module approach break things when porting back to desktop
This commit is contained in:
parent
f1dcc694de
commit
68ae14d967
@ -10,4 +10,4 @@ bringing all your favourite notion-enhancer features to the browser (wip)
|
|||||||
>
|
>
|
||||||
> i'll be building the enhancer chrome-first from now on, since it'll be more limited there (and it's easier to add extra features when porting than to take features out), and then releasing the app loader a little afterwards. both the app loader and the chrome extension will source the same themes & extensions from the mod repository, and updates & releases of individual mods won't require waiting for the enhancer version anymore.
|
> i'll be building the enhancer chrome-first from now on, since it'll be more limited there (and it's easier to add extra features when porting than to take features out), and then releasing the app loader a little afterwards. both the app loader and the chrome extension will source the same themes & extensions from the mod repository, and updates & releases of individual mods won't require waiting for the enhancer version anymore.
|
||||||
|
|
||||||
- from the #announcements channel of the [notion-enhancer discord](https://discord.gg/sFWPXtA)
|
-- from the #announcements channel of the [notion-enhancer discord](https://discord.gg/sFWPXtA)
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "src/worker.js"
|
"service_worker": "worker.js"
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"default_popup": "src/gui.html"
|
"default_popup": "src/gui.html"
|
||||||
|
@ -1 +1 @@
|
|||||||
[{"name":"theming","id":"0f0bf8b6-eae6-4273-b307-8fc43f2ee082","description":"the default theme variables, required by other themes & extensions.","version":"0.11.0","tags":["core","theme"],"authors":[{"name":"dragonwocky","email":"thedragonring.bod@gmail.com","url":"https://dragonwocky.me/","icon":"https://dragonwocky.me/avatar.jpg"}],"css":{"client":["client.css"]},"dir":"theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082","js":{}}]
|
[{"name":"theming","id":"0f0bf8b6-eae6-4273-b307-8fc43f2ee082","description":"the default theme variables, required by other themes & extensions.","version":"0.11.0","tags":["core","theme"],"authors":[{"name":"dragonwocky","email":"thedragonring.bod@gmail.com","url":"https://dragonwocky.me/","icon":"https://dragonwocky.me/avatar.jpg"}],"css":{"client":["client.css"]},"js":{"client":["test.js"]},"dir":"theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082"}]
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const registry = fetch(chrome.runtime.getURL('registry.json')).then((response) =>
|
const registry = fetch(chrome.runtime.getURL('/registry.json')).then((response) =>
|
||||||
response.json()
|
response.json()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -14,6 +14,9 @@ export default async () => {
|
|||||||
for (let sheet of mod.css?.client || []) {
|
for (let sheet of mod.css?.client || []) {
|
||||||
web.loadStyleset(`repo/${mod.dir}/${sheet}`);
|
web.loadStyleset(`repo/${mod.dir}/${sheet}`);
|
||||||
}
|
}
|
||||||
|
for (let script of mod.js?.client || []) {
|
||||||
|
import(chrome.runtime.getURL(`repo/${mod.dir}/${script}`));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -3,5 +3,3 @@
|
|||||||
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||||
* (https://notion-enhancer.github.io/) under the MIT license
|
* (https://notion-enhancer.github.io/) under the MIT license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
|
Loading…
Reference in New Issue
Block a user