auto reload
This commit is contained in:
parent
213ba00505
commit
2b358d0e1c
|
@ -38,6 +38,9 @@ $mailIdsJoinedString = filter_var(join('|', $mailIds), FILTER_SANITIZE_SPECIAL_C
|
|||
<link rel="stylesheet" href="spinner.css">
|
||||
|
||||
<script>
|
||||
|
||||
var mailCount = <?php echo count($emails)?>;
|
||||
|
||||
function copyToClipboard(text) {
|
||||
var inp = document.createElement('input');
|
||||
document.body.appendChild(inp);
|
||||
|
@ -72,8 +75,8 @@ $mailIdsJoinedString = filter_var(join('|', $mailIds), FILTER_SANITIZE_SPECIAL_C
|
|||
console.log("There are", r.responseText, "new mails.");
|
||||
document.getElementById("new-content-avalable").style.display = 'block';
|
||||
|
||||
// If there are no emails displayed, we can reload the page without loosing any state.
|
||||
if(<?php echo count($emails)?> === 0) {
|
||||
// If there are no emails displayed, we can reload the page without looing any state.
|
||||
if (mailCount === 0) {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user