GUAC-761: Store API version. Perform sanity checks within webapp.

This commit is contained in:
Michael Jumper
2014-07-01 15:45:29 -07:00
parent b81499cb9d
commit f03baec73b
2 changed files with 41 additions and 3 deletions

View File

@@ -155,11 +155,16 @@
<!-- Init -->
<script type="text/javascript"> /* <![CDATA[ */
// Sanity check Guacamole JavaScript API version
if (Guacamole.API_VERSION !== "0.9.1")
GuacUI.Client.showStatus("Clear Your Cache", "An older version of Guacamole has been cached by your browser. Please clear your browser's cache and try again.");
// Start connect after control returns from onload (allow browser
// to consider the page loaded).
window.onload = function() {
window.setTimeout(GuacUI.Client.connect, 10);
};
else
window.onload = function() {
window.setTimeout(GuacUI.Client.connect, 10);
};
/* ]]> */ </script>