[add] codeserver4

This commit is contained in:
Andy Bunce 2022-01-06 16:54:13 +00:00
parent be6df6b846
commit e61baafa22
6 changed files with 65 additions and 35 deletions

View file

@ -1,37 +1,4 @@
// hack file:// load
if (/^file:\/\/\//.test(location.href)) {
let path = './';
let orig = fetch;
window.fetch = (resource) => ((/^[^/:]*:/.test(resource)) ?
orig(resource) :
new Promise(function(resolve, reject) {
let request = new XMLHttpRequest();
let fail = (error) => {reject(error)};
['error', 'abort'].forEach((event) => { request.addEventListener(event, fail); });
let pull = (expected) => (new Promise((resolve, reject) => {
if (
request.responseType == expected ||
(expected == 'text' && !request.responseType)
)
resolve(request.response);
else
reject(request.responseType);
}));
request.addEventListener('load', () => (resolve({
arrayBuffer : () => (pull('arraybuffer')),
blob : () => (pull('blob')),
text : () => (pull('text')),
json : () => (pull('json'))
})));
request.open('GET', resource.replace(/^\//, path));
request.send();
})
);
}
// app
var app = new Vue({
el: '#app',
data: {

View file

@ -1,6 +1,14 @@
[
{"href": "http://n2-plus.local:19999/", "text": "netdata", "port": "19999"},
{"href": "http://n2-plus.local:9000/", "text": "portainer", "port": "9000"},
{"href": "http://n2-plus.local", "text": "index", "port": ""},
{"href": "http://n2-plus.local:9981/", "text": "tvheadend", "port": "9981"},
{"href": "http://n2-plus.local:8088/", "text": "tiddly", "port": "8088"},
{"href": "http://n2-plus.local:8002/", "text": "piwigo", "port": "8002"},
{"href": "http://n2-plus.local:3030/", "text": "fuseki", "port": "3030"},
{"href": "http://n2-plus.local:8002/", "text": "portainer", "port": "8002"},
{"href": "http://n2-plus.local:8443/", "text": "code-server", "port": "8443"},
{"href": "http://n2-plus.local:8444/", "text": "code-server4", "port": "8444"},
{"href": "http://n2-plus.local:8300/", "text": "gitea", "port": "8300"},
{"href": "http://n2-plus.local", "text": "caddy", "port": "80"},
{"href": "http://fish.local", "text": "fish", "port": ""}
]