5
0
mirror of git://git.proxmox.com/git/novnc-pve.git synced 2025-01-24 06:03:54 +03:00
novnc-pve/debian/patches/0007-add-replaceable-snippets-in-vnc.html.patch
Dominik Csapak fe91e9e1e3 add new rebased patches
adds the new rebased patches, based on current novnc master
notable changes:
* (most of) our code is in an es6 module, opposed to patching the ui.js
* removed our sendkeys menu in favor of the novnc one
* you can now enter fullscreen from a popup console
* when a vm resizes its resolution, the canvas should also rescale in
  the console tab

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-24 13:00:39 +02:00

42 lines
1.2 KiB
Diff

From c3d885b78fd816201ed485eb7a681ce1fcf3a122 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Fri, 20 Jan 2017 10:16:09 +0100
Subject: [PATCH 7/9] add replaceable snippets in vnc.html
so that we can insert the username/csrftoken via search/replace
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
vnc.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/vnc.html b/vnc.html
index e789d04..1423f78 100644
--- a/vnc.html
+++ b/vnc.html
@@ -15,7 +15,7 @@
or the fragment:
http://example.com/#host=HOST&port=PORT&encrypt=1
-->
- <title>noVNC</title>
+ <title>[% nodename %] - Proxmox Console</title>
<meta charset="utf-8" />
@@ -38,6 +38,12 @@
<!-- this is included as a normal file in order to catch script-loading errors as well -->
<script type="text/javascript" src="/novnc/app/error-handler.js"></script>
+ <script type="text/javascript">
+ if (typeof(PVE) === 'undefined') PVE = {};
+ PVE.UserName = '[% username %]';
+ PVE.CSRFPreventionToken = '[% token %]';
+ INCLUDE_URI='/novnc/include';
+ </script>
<!-- begin scripts -->
<!-- promise polyfills promises for IE11 -->
--
2.11.0