This commit is contained in:
2026-05-20 18:20:47 +02:00
parent 42e3d55cf4
commit dfd5fdc27c
2 changed files with 8 additions and 5 deletions
+5 -2
View File
@@ -80,11 +80,14 @@ if (process.platform === 'win32') {
const pluginConfigs = []; const pluginConfigs = [];
readJSFiles(pluginsDir).forEach(file => { readJSFiles(pluginsDir).forEach(file => {
const dir = fs.statSync(filePath).isDirectory();
var filePath = path.join(pluginsDir, file); var filePath = path.join(pluginsDir, file);
if(fs.statSync(filePath).isDirectory()) filePath = path.join(pluginsDir, file, file); if(dir) filePath = path.join(pluginsDir, file, file);
const config = parsePluginConfig(filePath); const config = parsePluginConfig(filePath);
if (Object.keys(config).length > 0) pluginConfigs.push(config); if(dir) config = {...config, prefix: file}
else config = {...config, prefix: ""}
pluginConfigs.push(config);
}); });
module.exports = pluginConfigs; module.exports = pluginConfigs;
+3 -3
View File
@@ -420,12 +420,12 @@
<p>Any compatible <strong>.js</strong> plugin, which is in the "plugins" folder, will be listed here.<br> <p>Any compatible <strong>.js</strong> plugin, which is in the "plugins" folder, will be listed here.<br>
Click on the individual plugins to enable/disable them.</p> Click on the individual plugins to enable/disable them.</p>
<select id="plugins" class="multiselect" multiple> <select id="plugins" class="multiselect" multiple>
<% plugins.forEach(function(plugin) { <% plugins.forEach(function(plugin) {
if (plugin.frontEndPath) { %> if (plugin.frontEndPath) { %>
<option data-name="<%= plugin.frontEndPath %>" title="<%= plugin.name %> by <%= plugin.author %> [v<%= plugin.version %>]"> <option data-name="<%= plugin.prefix %><%= plugin.frontEndPath %>" title="<%= plugin.name %> by <%= plugin.author %> [v<%= plugin.version %>]">
<%= plugin.name %> by <%= plugin.author %> [v<%= plugin.version %>] <%= plugin.name %> by <%= plugin.author %> [v<%= plugin.version %>]
</option> </option>
<% } <% }
}); %> }); %>
</select><br><br> </select><br><br>
<a href="https://github.com/NoobishSVK/fm-dx-webserver/wiki/Plugin-List" target="_blank">Download new plugins here!</a> <a href="https://github.com/NoobishSVK/fm-dx-webserver/wiki/Plugin-List" target="_blank">Download new plugins here!</a>