Commit 8e1ebdf for novnc.com

commit 8e1ebdffba02e651c399dacef841f8941f6ad6e4
Author: Pierre Ossman <ossman@cendio.se>
Date:   Fri Feb 13 12:33:11 2026 +0100

    Remove some unused assignments

    Mainly to keep eslint happy with its new recommended rules. But it also
    makes the code more clear to not have unused stuff in it.

    The des code got a bit more refactoring since eslint was upset about the
    final "i++" as it was technically an unused assignment.

diff --git a/app/ui.js b/app/ui.js
index 6ed89d6..24d32d5 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -138,10 +138,8 @@ const UI = {

         let autoconnect = UI.getSetting('autoconnect');
         if (autoconnect === 'true' || autoconnect == '1') {
-            autoconnect = true;
             UI.connect();
         } else {
-            autoconnect = false;
             // Show the connect panel on first load unless autoconnecting
             UI.openConnectPanel();
         }
@@ -1213,7 +1211,7 @@ const UI = {
     },

     securityFailed(e) {
-        let msg = "";
+        let msg;
         // On security failures we might get a string with a reason
         // directly from the server. Note that we can't control if
         // this string is translated or not.
diff --git a/core/crypto/des.js b/core/crypto/des.js
index 8dab31f..34ee7a6 100644
--- a/core/crypto/des.js
+++ b/core/crypto/des.js
@@ -181,11 +181,11 @@ class DES {
     // Encrypt 8 bytes of text
     enc8(text) {
         const b = text.slice();
-        let i = 0, l, r, x; // left, right, accumulator
+        let l, r, x; // left, right, accumulator

         // Squash 8 bytes to 2 ints
-        l = b[i++]<<24 | b[i++]<<16 | b[i++]<<8 | b[i++];
-        r = b[i++]<<24 | b[i++]<<16 | b[i++]<<8 | b[i++];
+        l = b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3];
+        r = b[4]<<24 | b[5]<<16 | b[6]<<8 | b[7];

         x = ((l >>> 4) ^ r) & 0x0f0f0f0f;
         r ^= x;
@@ -252,7 +252,7 @@ class DES {

         // Spread ints to bytes
         x = [r, l];
-        for (i = 0; i < 8; i++) {
+        for (let i = 0; i < 8; i++) {
             b[i] = (x[i>>>2] >>> (8 * (3 - (i % 4)))) % 256;
             if (b[i] < 0) { b[i] += 256; } // unsigned
         }
diff --git a/core/decoders/zrle.js b/core/decoders/zrle.js
index ef1726f..b1df317 100644
--- a/core/decoders/zrle.js
+++ b/core/decoders/zrle.js
@@ -175,7 +175,7 @@ export default class ZRLEDecoder {

     _readRLELength() {
         let length = 0;
-        let current = 0;
+        let current;
         do {
             current = this._inflator.inflate(1)[0];
             length += current;
diff --git a/core/rfb.js b/core/rfb.js
index 1073a87..8994317 100644
--- a/core/rfb.js
+++ b/core/rfb.js
@@ -2949,7 +2949,7 @@ export default class RFB extends EventTargetMixin {

         // We need to handle errors when we requested the resize.
         if (this._FBU.x === 1 && this._FBU.y !== 0) {
-            let msg = "";
+            let msg;
             // The y-position indicates the status code from the server
             switch (this._FBU.y) {
                 case 1: