Files
ThreadNet-Web/src/vector/mobile_guide/index.js
T

26 lines
855 B
JavaScript
Raw Normal View History

2018-09-03 20:38:30 +01:00
import {getVectorConfig} from '../getconfig';
function onBackToRiotClick() {
2019-04-02 11:18:05 -06:00
// Cookie should expire in 24 hours
document.cookie = 'mobile_redirect_to_guide=false;path=/;max-age=86400';
2018-09-03 20:38:30 +01:00
window.location.href = '../';
}
async function initPage() {
document.getElementById('back_to_riot_button').onclick = onBackToRiotClick;
const config = await getVectorConfig('..');
2018-09-04 10:08:52 +01:00
let hsUrl;
2018-09-03 20:38:30 +01:00
if (config && config['default_hs_url']) {
hsUrl = config['default_hs_url'];
}
2018-09-27 18:19:33 +01:00
if (hsUrl && !hsUrl.endsWith('/')) hsUrl += '/';
2018-09-04 10:08:52 +01:00
if (hsUrl && hsUrl !== 'https://matrix.org/') {
document.getElementById('step2_container').style.display = 'block';
document.getElementById('hs_url').innerHTML = hsUrl;
document.getElementById('step_login_header').innerHTML= 'Step 3: Register or Log in';
}
2018-09-03 20:38:30 +01:00
}
initPage();