show marsify date

master
Aevann 2024-02-19 00:42:35 +02:00
parent a83dc601ec
commit 9a3607a10b
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,4 @@
const marsified = document.getElementById('marsified').value
const marsified_date = formatDate(new Date(marsified*1000));
const marsified_text = `You're marsified until ${marsified_date}`;
document.getElementById('marsifyswitch').nextElementSibling.innerHTML += marsified_text;

View File

@ -343,6 +343,11 @@
<script defer src="{{'js/namechanged.js' | asset}}"></script>
{% endif %}
{% if v.marsify and v.marsify != 1 %}
<input hidden id="marsified" value="{{v.marsify}}">
<script defer src="{{'js/marsified.js' | asset}}"></script>
{% endif %}
<script defer src="{{'js/settings_profile.js' | asset}}"></script>
{% macro permanent_filter_modal(id, form_action, field, friendly_name, badge_name) %}