From b20e51561ae9313247978af22981f0e0e59dec0c Mon Sep 17 00:00:00 2001 From: si458 Date: Sun, 29 Sep 2024 13:26:11 +0100 Subject: [PATCH] fix novnc missing desktopName from title #6412 Signed-off-by: si458 --- public/novnc/app/ui.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/novnc/app/ui.js b/public/novnc/app/ui.js index 33a51a77..fc0c4396 100644 --- a/public/novnc/app/ui.js +++ b/public/novnc/app/ui.js @@ -18,6 +18,8 @@ import Keyboard from "../core/input/keyboard.js"; import RFB from "../core/rfb.js"; import * as WebUtil from "./webutil.js"; +const PAGE_TITLE = "noVNC"; + // String validation function isAlphaNumeric(str) { return (str.match(/^[A-Za-z0-9]+$/) != null); }; function isSafeString(str) { return ((typeof str == 'string') && (str.indexOf('<') == -1) && (str.indexOf('>') == -1) && (str.indexOf('&') == -1) && (str.indexOf('"') == -1) && (str.indexOf('\'') == -1) && (str.indexOf('+') == -1) && (str.indexOf('(') == -1) && (str.indexOf(')') == -1) && (str.indexOf('#') == -1) && (str.indexOf('%') == -1)) }; @@ -1739,9 +1741,9 @@ const UI = { }, updateDesktopName(e) { - // UI.desktopName = e.detail.name; + UI.desktopName = e.detail.name; // Display the desktop name in the document title - // document.title = e.detail.name + " - " + PAGE_TITLE; + document.title = e.detail.name + " - " + PAGE_TITLE; }, bell(e) {