From c94b73606231da5206372f69103173d56135a960 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 4 Dec 2019 12:04:20 +0000 Subject: [PATCH 1/3] Added CrossDomain logging to console --- public/misc/script.index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/misc/script.index.js b/public/misc/script.index.js index cc1f548..d20c30a 100644 --- a/public/misc/script.index.js +++ b/public/misc/script.index.js @@ -49,15 +49,17 @@ $(document).ready(function(){ token: data.SecureToken })) } - }).done(function() { + }).done(function(data, textStatus) { NProgress.inc(1 / XHR.length); - }).fail(function() { + console.log('CrossDomain login step [' + data + ':' + textStatus + ']'); + }).fail(function(_jqXHR, textStatus, errorThrown) { + console.log('CrossDomain login failed for at least one domain [' + textStatus + ':' + errorThrown + ']'); // Should check why this failed (timeout or bad request?), and if this is the origin domain, take action })); }); $.when.apply($, XHR).then(function(){ $.each(arguments, function(_index, _arg) { - // Finished cross-domain logins (either succesfully or through timeout) + // Finished cross-domain logins (either successfully or through timeout) NProgress.done(); window.location.replace(data.Location); }); From e520108237fdf0824d0a8b90983a7214a9748513 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Fri, 6 Dec 2019 12:55:10 +0000 Subject: [PATCH 2/3] Added CrossDomain logging to console --- public/misc/script.index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/misc/script.index.js b/public/misc/script.index.js index cc1f548..972e144 100644 --- a/public/misc/script.index.js +++ b/public/misc/script.index.js @@ -49,16 +49,19 @@ $(document).ready(function(){ token: data.SecureToken })) } - }).done(function() { + }).done(function(_data, _textStatus, jqXHR) { NProgress.inc(1 / XHR.length); - }).fail(function() { + console.log('CrossDomain login succeeded for domain `' + domain + '` [' + JSON.stringify(jqXHR) + ']'); + }).fail(function(jqXHR) { + console.log('CrossDomain login failed for domain `' + domain + '` [' + JSON.stringify(jqXHR) + ')]'); // Should check why this failed (timeout or bad request?), and if this is the origin domain, take action })); }); $.when.apply($, XHR).then(function(){ $.each(arguments, function(_index, _arg) { - // Finished cross-domain logins (either succesfully or through timeout) + // Finished cross-domain logins (either successfully or through timeout) NProgress.done(); + console.log('CrossDomain login completed; forwarding to `' + data.Location + '`'); window.location.replace(data.Location); }); }); From 0a6d0bf329b2cc93c5b1a9da77234aaab32bdc10 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Fri, 6 Dec 2019 12:58:24 +0000 Subject: [PATCH 3/3] Resolved mergeconflicts --- public/misc/script.index.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/public/misc/script.index.js b/public/misc/script.index.js index d3158ea..972e144 100644 --- a/public/misc/script.index.js +++ b/public/misc/script.index.js @@ -49,19 +49,11 @@ $(document).ready(function(){ token: data.SecureToken })) } -<<<<<<< HEAD }).done(function(_data, _textStatus, jqXHR) { NProgress.inc(1 / XHR.length); console.log('CrossDomain login succeeded for domain `' + domain + '` [' + JSON.stringify(jqXHR) + ']'); }).fail(function(jqXHR) { console.log('CrossDomain login failed for domain `' + domain + '` [' + JSON.stringify(jqXHR) + ')]'); -======= - }).done(function(data, textStatus) { - NProgress.inc(1 / XHR.length); - console.log('CrossDomain login step [' + data + ':' + textStatus + ']'); - }).fail(function(_jqXHR, textStatus, errorThrown) { - console.log('CrossDomain login failed for at least one domain [' + textStatus + ':' + errorThrown + ']'); ->>>>>>> c94b73606231da5206372f69103173d56135a960 // Should check why this failed (timeout or bad request?), and if this is the origin domain, take action })); });