[Chore] Update ALL meta tags to be dynamic

This commit is contained in:
ClaraCrazy 2026-01-05 06:49:21 +01:00
parent 6ba3ccf415
commit 16ccc978f9
No known key found for this signature in database
GPG key ID: EBBC896ACB497011
4 changed files with 31 additions and 28 deletions

View file

@ -551,8 +551,23 @@ document.addEventListener('DOMContentLoaded', () => {
});
}
// Raw mail tab switcher
function initRawTabs() {
const buttons = document.querySelectorAll('.raw-tab-button');
const panels = document.querySelectorAll('.raw-mail[data-panel]');
if (buttons.length === 0) return;
buttons.forEach(btn => {
btn.addEventListener('click', () => {
const target = btn.dataset.target;
buttons.forEach(b => b.classList.toggle('active', b === btn));
panels.forEach(p => p.classList.toggle('hidden', p.dataset.panel !== target));
});
});
}
// Expose utilities and run them
window.utils = { formatEmailDates, formatMailDate, initLockModals, initCopyAddress, initExpiryTimers, initQrModal, initHamburgerMenu, initThemeToggle, initRefreshCountdown, initCryptoKeysToggle, initForwardModal, initForwardAllModal, initAccountModals };
window.utils = { formatEmailDates, formatMailDate, initLockModals, initCopyAddress, initExpiryTimers, initQrModal, initHamburgerMenu, initThemeToggle, initRefreshCountdown, initCryptoKeysToggle, initForwardModal, initForwardAllModal, initAccountModals, initRawTabs };
formatEmailDates();
formatMailDate();
initLockModals();
@ -563,4 +578,5 @@ document.addEventListener('DOMContentLoaded', () => {
initForwardModal();
initCryptoKeysToggle();
initAccountModals();
initRawTabs();
});

View file

@ -11,25 +11,25 @@
<!-- SEO Meta Tags -->
<meta name="description" content="Your temporary Inbox. Create instant throwaway email addresses to protect your privacy. No registration required. Emails auto-delete after {{ purgeTimeRaw | readablePurgeTime }}.">
<meta name="keywords" content="temporary email, disposable email, throwaway email, fake email, temp mail, anonymous email, 48hr email, privacy protection, burner email">
<meta name="author" content="CrazyCo">
<meta name="author" content="{{ branding.1 }}">
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow">
<link rel="canonical" href="https://48hr.email/">
<link rel="canonical" href="{{ config.http.baseUrl }}/">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://48hr.email/">
<meta property="og:title" content="48hr.email - Your temporary Inbox">
<meta property="og:url" content="{{ config.http.baseUrl }}/">
<meta property="og:title" content="{{ branding.0 }} - Your temporary Inbox">
<meta property="og:description" content="Protect your privacy with free temporary email addresses. No registration required. Emails auto-delete after {{ purgeTimeRaw | readablePurgeTime }}.">
<meta property="og:image" content="https://48hr.email/images/logo.png">
<meta property="og:site_name" content="48hr.email">
<meta property="og:image" content="{{ config.http.baseUrl }}/images/logo.png">
<meta property="og:site_name" content="{{ branding.0 }}">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="https://48hr.email/">
<meta name="twitter:title" content="48hr.email - Your temporary Inbox">
<meta name="twitter:url" content="{{ config.http.baseUrl }}/">
<meta name="twitter:title" content="{{ branding.0 }} - Your temporary Inbox">
<meta name="twitter:description" content="Free temporary email service. Protect your privacy with disposable email addresses.">
<meta name="twitter:image" content="https://48hr.email/images/logo.png">
<meta name="twitter:image" content="{{ config.http.baseUrl }}/images/logo.png">
{% endblock %}
<!-- Additional Meta Tags -->

View file

@ -13,19 +13,6 @@
<pre class="raw-mail hidden" data-panel="decoded">{{ decoded | e }}</pre>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const buttons = document.querySelectorAll('.raw-tab-button');
const panels = document.querySelectorAll('.raw-mail[data-panel]');
buttons.forEach(btn => {
btn.addEventListener('click', () => {
const target = btn.dataset.target;
buttons.forEach(b => b.classList.toggle('active', b === btn));
panels.forEach(p => p.classList.toggle('hidden', p.dataset.panel !== target));
});
});
});
</script>
{% endblock %}
{% block footer %}{% endblock %}

View file

@ -6,18 +6,18 @@
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://48hr.email/stats">
<meta property="og:url" content="{{ config.http.baseUrl }}/stats">
<meta property="og:title" content="Email Statistics - {{ branding.0 }}">
<meta property="og:description" content="{{ metaStats.currentCount }} emails in system | {{ metaStats.allTimeTotal }} all-time total | Real-time monitoring and predictions">
<meta property="og:image" content="https://48hr.email/images/logo.png">
<meta property="og:image" content="{{ config.http.baseUrl }}/images/logo.png">
<meta property="og:site_name" content="{{ branding.0 }}">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="https://48hr.email/stats">
<meta name="twitter::title" content="Email Statistics - {{ branding.0 }}">
<meta name="twitter:url" content="{{ config.http.baseUrl }}/stats">
<meta name="twitter:title" content="Email Statistics - {{ branding.0 }}">
<meta name="twitter:description" content="{{ metaStats.currentCount }} emails | {{ metaStats.allTimeTotal }} all-time | Live monitoring">
<meta name="twitter:image" content="https://48hr.email/images/logo.png">
<meta name="twitter:image" content="{{ config.http.baseUrl }}/images/logo.png">
{% endblock %}
{% block header %}