Persist and update clipboard, improve styling.

This commit is contained in:
Michael Jumper
2012-11-04 22:31:23 -08:00
parent 695edad4c7
commit 5d92eb705b
3 changed files with 17 additions and 7 deletions

View File

@@ -233,6 +233,8 @@ GuacamoleUI.attach = function(guac) {
var guac_display = guac.getDisplay();
var state = new GuacamoleSessionState();
// Set document title appropriately, based on prefix and connection name
function updateTitle() {
@@ -478,6 +480,10 @@ GuacamoleUI.attach = function(guac) {
GuacamoleUI.hideStatus();
title_prefix = null;
// Update clipboard with current data
if (state.getProperty("clipboard"))
guac.setClipboard(state.getProperty("clipboard"));
// Regularly update screenshot if storage available
if (localStorage)
window.setInterval(updateThumbnail, 5000);
@@ -548,8 +554,6 @@ GuacamoleUI.attach = function(guac) {
};
var state = new GuacamoleSessionState();
// Server copy handler
guac.onclipboard = function(data) {
state.setProperty("clipboard", data);