@nsnanocat/preference-panes 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/settings/app.mjs +2 -1
- package/dist/settings/index.html +3 -3
- package/package.json +1 -1
- package/src/browser/app.mjs +2 -1
package/dist/settings/app.mjs
CHANGED
|
@@ -979,11 +979,12 @@ async function render() {
|
|
|
979
979
|
const data = await response.json();
|
|
980
980
|
if (typeof data.name !== "string" || !Array.isArray(data.apps)) throw new TypeError("Invalid site BoxJS JSON");
|
|
981
981
|
for (const app of data.apps) validatePathParts([app.module]);
|
|
982
|
+
const localStyles = document.head.querySelector('link[rel="stylesheet"]');
|
|
982
983
|
for (const href of data.stylesheets ?? []) {
|
|
983
984
|
const link = document.createElement("link");
|
|
984
985
|
link.rel = "stylesheet";
|
|
985
986
|
link.href = resourceURL(href);
|
|
986
|
-
document.head.
|
|
987
|
+
document.head.insertBefore(link, localStyles);
|
|
987
988
|
}
|
|
988
989
|
menu = data;
|
|
989
990
|
}
|
package/dist/settings/index.html
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
|
6
6
|
<meta name="color-scheme" content="light dark">
|
|
7
7
|
<title>Preferences</title>
|
|
8
|
-
<link rel="stylesheet" href="/settings/assets/panel.css?v=0.4.
|
|
9
|
-
<link rel="stylesheet" href="/settings/assets/home.css?v=0.4.
|
|
8
|
+
<link rel="stylesheet" href="/settings/assets/panel.css?v=0.4.1">
|
|
9
|
+
<link rel="stylesheet" href="/settings/assets/home.css?v=0.4.1">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<main id="preferences"></main>
|
|
13
|
-
<script type="module" src="/settings/assets/app.mjs?v=0.4.
|
|
13
|
+
<script type="module" src="/settings/assets/app.mjs?v=0.4.1"></script>
|
|
14
14
|
</body>
|
|
15
15
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nsnanocat/preference-panes",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Shared settings API runtime for JavaScript proxy modules",
|
|
5
5
|
"author": "VirgilClyne <Virgil@nanocat.me>",
|
|
6
6
|
"homepage": "https://NSNanoCat.github.io/preference-panes",
|
package/src/browser/app.mjs
CHANGED
|
@@ -89,11 +89,12 @@ async function render() {
|
|
|
89
89
|
const data = await response.json();
|
|
90
90
|
if (typeof data.name !== "string" || !Array.isArray(data.apps)) throw new TypeError("Invalid site BoxJS JSON");
|
|
91
91
|
for (const app of data.apps) validatePathParts([app.module]);
|
|
92
|
+
const localStyles = document.head.querySelector('link[rel="stylesheet"]');
|
|
92
93
|
for (const href of data.stylesheets ?? []) {
|
|
93
94
|
const link = document.createElement("link");
|
|
94
95
|
link.rel = "stylesheet";
|
|
95
96
|
link.href = resourceURL(href);
|
|
96
|
-
document.head.
|
|
97
|
+
document.head.insertBefore(link, localStyles);
|
|
97
98
|
}
|
|
98
99
|
menu = data;
|
|
99
100
|
}
|