fix novnc missing desktopName from title #6412

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Sep 29, 2024 at 13:26 UTC b20e51561ae9313247978af22981f0e0e59dec0c
1 file changed +4 -2
public/novnc/app/ui.js
+4 -2
@@ -18,6 +18,8 @@ import Keyboard from "../core/input/keyboard.js";
18 import RFB from "../core/rfb.js";
19 import * as WebUtil from "./webutil.js";
20
21 +const PAGE_TITLE = "noVNC";
22 +
23 // String validation
24 function isAlphaNumeric(str) { return (str.match(/^[A-Za-z0-9]+$/) != null); };
25 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 = {
1741 },
1742
1743 updateDesktopName(e) {
1742 - // UI.desktopName = e.detail.name;
1744 + UI.desktopName = e.detail.name;
1745 // Display the desktop name in the document title
1744 - // document.title = e.detail.name + " - " + PAGE_TITLE;
1746 + document.title = e.detail.name + " - " + PAGE_TITLE;
1747 },
1748
1749 bell(e) {