@etspress/netflix 0.1.0 → 0.1.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/package.json +7 -2
- package/plugin.json +1 -1
- package/public/inject.js +4 -2
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etspress/netflix",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "流媒体合租主题插件",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/cnmbdb/dujioka-next-deve.git",
|
|
10
|
+
"directory": "plugins/netflix"
|
|
11
|
+
},
|
|
7
12
|
"files": [
|
|
8
13
|
"plugin.json",
|
|
9
14
|
".env.example",
|
|
@@ -13,7 +18,7 @@
|
|
|
13
18
|
"id": "netflix",
|
|
14
19
|
"name": "流媒体合租主题",
|
|
15
20
|
"description": "流媒体合租商店主题与页面展示配置",
|
|
16
|
-
"version": "0.1.
|
|
21
|
+
"version": "0.1.1",
|
|
17
22
|
"runtime": {
|
|
18
23
|
"type": "npm-static",
|
|
19
24
|
"publicRoot": "public"
|
package/plugin.json
CHANGED
package/public/inject.js
CHANGED
|
@@ -329,10 +329,12 @@
|
|
|
329
329
|
if (state.checking) return;
|
|
330
330
|
state.checking = true;
|
|
331
331
|
try {
|
|
332
|
-
var response = await fetch('/plugins/
|
|
332
|
+
var response = await fetch(apiBase + '/plugins/public-assets?context=admin', { cache: 'no-store' });
|
|
333
333
|
if (!response.ok) return;
|
|
334
334
|
var registry = await response.json();
|
|
335
|
-
var enabled =
|
|
335
|
+
var enabled = Array.isArray(registry.assets) && registry.assets.some(function (plugin) {
|
|
336
|
+
return plugin && plugin.id === pluginId;
|
|
337
|
+
});
|
|
336
338
|
state.enabled = Boolean(enabled);
|
|
337
339
|
if (!state.enabled) {
|
|
338
340
|
state.configLoaded = false;
|