WebSockets: workaround for index page on Windows

Avoid 404s when following surface links while the issue in https://github.com/Ardour/ardour/pull/491 is better investigated
This commit is contained in:
Luciano Iam 2020-04-24 12:39:01 +02:00
parent ea8d1d09d4
commit f983dfe6a7

View file

@ -47,9 +47,16 @@ import { ArdourClient } from '/shared/ardour.js';
group.surfaces.sort((a, b) => a.name.localeCompare(b.name));
for (const surface of group.surfaces) {
let path = group.path + '/' + surface.path + '/';
// see https://github.com/Ardour/ardour/pull/491
if (navigator.userAgent.indexOf('Windows') != -1) {
path += 'index.html';
}
const li = document.createElement('li');
li.innerHTML = `<li>
<a href="${group.path}/${surface.path}/">${surface.name}</a>
<a href="${path}">${surface.name}</a>
&thinsp;
<span class="surface-version">(${surface.version})</span>
<p>${surface.description}</p>