mirror of
https://github.com/Crazyco-xyz/48hr.email.git
synced 2025-12-15 22:36:32 +01:00
Move js into its own file
This commit is contained in:
parent
9538e7be7a
commit
64550e351c
2 changed files with 9 additions and 5 deletions
7
infrastructure/web/public/javascripts/inbox-init.js
Normal file
7
infrastructure/web/public/javascripts/inbox-init.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const script = document.currentScript;
|
||||
const address = script ? script.dataset.address : '';
|
||||
if (address) {
|
||||
enableNewMessageNotifications(address, true);
|
||||
}
|
||||
});
|
||||
|
|
@ -1,11 +1,8 @@
|
|||
{% extends 'layout.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
enableNewMessageNotifications('{{ address }}', true)
|
||||
});
|
||||
</script>
|
||||
<script src="/javascripts/inbox-init.js" defer data-address="{{ address }}"></script>
|
||||
<script src="/javascripts/lock-modals.js" defer></script>
|
||||
|
||||
<div class="action-links">
|
||||
<a href="/inbox/{{ address }}/delete-all">Wipe Inbox</a>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue