diff --git a/goon/browserassets/html/saveInstructions.html b/goon/browserassets/html/saveInstructions.html
new file mode 100644
index 00000000000..90040b041a0
--- /dev/null
+++ b/goon/browserassets/html/saveInstructions.html
@@ -0,0 +1,19 @@
+
+
+
+Save Instructions
+
+
+Save Instructions
+Due to the primitive nature of IE8, this file must be saved manually. To do so, simply follow these steps. (() indicates windows specific instuctions)
+
+ - Click anywhere below the line
+ - Use the Select All shortcut (ctrl+A)
+ - Use the Copy shortcut (ctrl+C)
+ - Create a new text document (right click desktop or explorer -> new text document)
+ - Click the document and paste to it (ctrl+v)
+ - Save the document with the extension .html instead of .txt
+
+
+
+
diff --git a/goon/browserassets/js/browserOutput.js b/goon/browserassets/js/browserOutput.js
index e823fcb1c06..0632bad9688 100644
--- a/goon/browserassets/js/browserOutput.js
+++ b/goon/browserassets/js/browserOutput.js
@@ -872,31 +872,57 @@ $(function() {
});
$('#saveLog').click(function(e) {
- var saved = '';
+ var openWindow = function (content) { //opens a window
+ var win;
+ try {
+ win = window.open('', 'RAW Chat Log', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, width=1200, height=800, top='+(screen.height-400)+', left='+(screen.width-840));
+ } catch (e) {
+ return;
+ }
+ if (win && win.document && window.document.body) {
+ win.document.body.innerHTML = content;
+ return win;
+ }
+ };
- if (window.XMLHtpRequest) {
+ if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
} else {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
- xmlHttp.open('GET', 'browserOutput.css', false);
+
+ // synchronous requests are depricated in modern browsers
+ xmlHttp.open('GET', 'browserOutput.css', true);
+ xmlHttp.onload = function (e) {
+ if (xmlHttp.status === 200) { // request successful
+
+ // Generate Log
+ var saved = '';
+ saved += $messages.html();
+ saved = saved.replace(/&/g, '&');
+ saved = saved.replace(/Chat Log \
+ '+
+ saved
+ openWindow(finalText);
+ } else { // request returned http error
+ openWindow('Style Doc Retrieve Error: '+xmlHttp.statusText);
+ }
+ }
+
+ // timeout and request errors
+ xmlHttp.timeout = 300;
+ xmlHttp.ontimeout = function (e) {
+ openWindow('XMLHttpRequest Timeout');
+ }
+ xmlHttp.onerror = function (e) {
+ openWindow('XMLHttpRequest Error: '+xmlHttp.statusText);
+ }
+ // css needs special headers
xmlHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
- xmlHttp.send();
- saved += '';
-
- saved += $messages.html();
- saved = saved.replace(/&/g, '&');
- saved = saved.replace(/