fix it better

This commit is contained in:
Kevin Gibbons 2022-11-27 20:01:06 -08:00
parent 4ea141c6fe
commit 25dd6dbdc5

View File

@ -28,8 +28,8 @@ document.getElementById("save-login").addEventListener("click", function () {
let parsed = new URL(url); let parsed = new URL(url);
let toStore = { let toStore = {
"access": { "access": {
"url": parsed.host, "url": `${parsed.protocol}//${parsed.hostname}`,
"port": parsed.port || '80', "port": parsed.port || (parsed.protocol === 'https' ? '443' : '80'),
"apiKey": document.getElementById("api-key").value "apiKey": document.getElementById("api-key").value
} }
}; };