Update button href dynamically

also make button a link 'cos buttons can't have hrefs
This commit is contained in:
David Baker
2019-09-10 18:27:57 +01:00
parent 845fbacd11
commit b8b10e79fe
2 changed files with 5 additions and 1 deletions

View File

@@ -92,6 +92,9 @@ async function initPage() {
if (isUrl && !isUrl.endsWith('/')) isUrl += '/';
if (hsUrl !== 'https://matrix.org/') {
document.getElementById('configure_riot_button').href =
"https://riot.im/config/config?hs_url=" + encodeURIComponent(hsUrl) +
"&is_url=" + encodeURIComponent(isUrl);
document.getElementById('step2_container').style.display = 'block';
document.getElementById('hs_url').innerText = hsUrl;
document.getElementById('step_login_header').innerHTML= '3: Launch the app';