predict wss url
This commit is contained in:
parent
721324c697
commit
04948e24f9
@ -69,5 +69,23 @@ function load() {
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', load);
|
||||
function autofillWSSURL() {
|
||||
console.log('here am i');
|
||||
if (stammTVBaseUrl.value.startsWith('http')) {
|
||||
let predictedWSSURL = stammTVBaseUrl.value.replace('https', 'wss').replace('http', 'wss');
|
||||
if (predictedWSSURL.endsWith('/')) {
|
||||
predictedWSSURL += 'wss'
|
||||
} else {
|
||||
predictedWSSURL += '/wss'
|
||||
}
|
||||
stammTVWSSUrl.value = predictedWSSURL;
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
|
||||
function init() {
|
||||
stammTVBaseUrl.onchange = autofillWSSURL;
|
||||
saveButton.addEventListener('click', validateAndSave);
|
||||
load();
|
||||
}
|
Loading…
Reference in New Issue
Block a user