I really like template literals.
authorArt Cancro <ajc@citadel.org>
Wed, 20 Dec 2023 04:12:38 +0000 (23:12 -0500)
committerArt Cancro <ajc@citadel.org>
Wed, 20 Dec 2023 04:12:38 +0000 (23:12 -0500)
And now that I know how to use them, I will be using more of them.

webcit-ng/static/js/view_mail.js

index 4b2470021b121ec1345b4e1ae60203d901e49a69..e78560a847cdf5d4728cd33cda7e76cf0c8b9f0e 100644 (file)
@@ -346,14 +346,14 @@ function view_render_mail() {
        d.style.display = "block";
        //d.addEventListener("click", mail_delete_selected);
 
-       document.getElementById("ctdl-main").innerHTML
-               = "<div id=\"ctdl-mailbox-grid-container\" class=\"ctdl-mailbox-grid-container\">"
-               + "<div id=\"ctdl-mailbox-pane\" class=\"ctdl-mailbox-pane\"></div>"
-               + "<div id=\"ctdl-mailbox-reading-pane\" class=\"ctdl-mailbox-reading-pane\"></div>"
-               + "</div>"
-       ;
+       document.getElementById("ctdl-main").innerHTML = `
+               <div id="ctdl-mailbox-grid-container" class="ctdl-mailbox-grid-container">
+               <div id="ctdl-mailbox-pane" class="ctdl-mailbox-pane"></div>
+               <div id="ctdl-mailbox-reading-pane" class="ctdl-mailbox-reading-pane"></div>
+               </div>
+       `;
 
-       highest_mailnum = 0;                                    // Keep track of highest message number to track newly arrived messages
+       highest_mailnum = 0;                                    // Keep track of highest msg number to track newly arrived msgs
        render_mailbox_display(newmail_notify.NO);
        try {                                                   // if this was already set up, clear it so there aren't multiple
                clearInterval(RefreshMailboxInterval);