diff --git a/code/modules/goonchat/browserassets/js/browserOutput.js b/code/modules/goonchat/browserassets/js/browserOutput.js
index a89a4039db6d..d8c8d5b8afe0 100644
--- a/code/modules/goonchat/browserassets/js/browserOutput.js
+++ b/code/modules/goonchat/browserassets/js/browserOutput.js
@@ -803,31 +803,25 @@ $(function() {
});
$('#saveLog').click(function(e) {
- var saved = '';
+ $.ajax({
+ type: 'GET',
+ url: 'browserOutput.css',
+ success: function(styleData) {
+ var win;
- if (window.XMLHttpRequest) {
- xmlHttp = new XMLHttpRequest();
- } else {
- xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
- }
- xmlHttp.open('GET', 'browserOutput.css', false);
- xmlHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
- xmlHttp.send();
- saved += '';
+ try {
+ win = window.open('', 'Chat Log', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, width=780, height=600, top=' + (screen.height/2 - 635/2) + ', left=' + (screen.width/2 - 780/2));
+ } catch (e) {
+ return;
+ }
- saved += $messages.html();
- saved = saved.replace(/&/g, '&');
- saved = saved.replace(/Chat Log';
+ win.document.head.innerHTML += '';
+ win.document.body.innerHTML = $messages.html();
+ }
+ }
+ });
});
$('#highlightTerm').click(function(e) {