mirror of
https://github.com/fediland/fediland.github.io.git
synced 2024-11-14 16:43:06 +00:00
27 lines
948 B
JavaScript
27 lines
948 B
JavaScript
// Should be included using 'defer' after servers.js and functions.js
|
|
|
|
let server = getRandomItem(instances);
|
|
|
|
console.log('Randomly selected: ', server);
|
|
|
|
// Server link
|
|
let linkElement = document.getElementById('reg-link');
|
|
linkElement.setAttribute('href', server.url);
|
|
linkElement.innerText = 'Регистрация на ' + server.name;
|
|
|
|
let platform = platforms[server.platform];
|
|
let regMode = registrationModes[server.registration];
|
|
|
|
// Additional metadata elements
|
|
let platformElement = document.getElementById('node-platform');
|
|
let registrationElement = document.getElementById('node-registration');
|
|
|
|
// Icon element
|
|
let platformIcon = document.createElement('img');
|
|
platformIcon.setAttribute('src', platform.icon);
|
|
|
|
platformElement.innerHTML = '';
|
|
platformElement.appendChild(platformIcon);
|
|
platformElement.appendChild(document.createTextNode(' ' + platform.name));
|
|
|
|
registrationElement.innerText = regMode.name; |