function plural(n, titles) {
return `${n} ` + titles[n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2];
}
function updateSummary() {
document.getElementById('completion-time').textContent =
completion_time <= 0
? 'Invalid'
: completion_time <= 24
? `${plural(completion_time, ['час', 'часа', 'часов'])}`
: `${plural(Math.ceil(completion_time / 24), ['день', 'дня', 'дней'])}`;
...
<script>
const base_url = "https://gameboost.com";
const api_url = "https://x-api.gameboost.com";
const asset_url = "https://gameboost.com/public/assets";
const ajax_url = "https://gameboost.com/ajax";
const icon_url = "https://gameboost.com/public/assets/uploads/icons";
const session_token = "";
const user_type = "client";
const user_id = "";
</script>
<script>
const base_url = "";
const api_url = "";
const asset_url = "";
const ajax_url = "";
const icon_url = "";
const session_token = "";
const user_type = "";
const user_id = "";
</script>