]> git.proxmox.com Git - novnc-pve.git/blob - debian/patches/0008-add-replaceable-snippets-in-vnc.html.patch
0f84dd713c5246a8d0bb738d90a5b8ee9a0b7237
[novnc-pve.git] / debian / patches / 0008-add-replaceable-snippets-in-vnc.html.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Dominik Csapak <d.csapak@proxmox.com>
3 Date: Fri, 20 Jan 2017 10:16:09 +0100
4 Subject: [PATCH 08/12] add replaceable snippets in vnc.html
5
6 so that we can insert the username/csrftoken via search/replace
7
8 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
9 ---
10 vnc.html | 10 ++++++++--
11 1 file changed, 8 insertions(+), 2 deletions(-)
12
13 diff --git a/vnc.html b/vnc.html
14 index fad5d4a..bba7d7d 100644
15 --- a/vnc.html
16 +++ b/vnc.html
17 @@ -13,7 +13,7 @@
18 or the fragment:
19 http://example.com/#host=HOST&port=PORT&encrypt=1
20 -->
21 - <title>noVNC</title>
22 + <title>[% nodename %] - Proxmox Console</title>
23
24 <meta charset="utf-8">
25
26 @@ -26,7 +26,13 @@
27 <link rel="stylesheet" href="/novnc/app/styles/pve.css" />
28
29 <!-- this is included as a normal file in order to catch script-loading errors as well -->
30 - <script src="/novnc/app/error-handler.js"></script>
31 + <script type="text/javascript" src="/novnc/app/error-handler.js"></script>
32 + <script type="text/javascript">
33 + if (typeof(PVE) === 'undefined') PVE = {};
34 + PVE.UserName = '[% username %]';
35 + PVE.CSRFPreventionToken = '[% token %]';
36 + INCLUDE_URI='/novnc/include';
37 + </script>
38
39 <!-- begin scripts -->
40 <!-- promise polyfills promises for IE11 -->