From 70ab099e2f6c1993d8b4b816e7087a9d2508c886 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 5 Apr 2017 09:24:44 +0200 Subject: [PATCH] chrome 59+ doesn't support inline basic auth credentials --- js/qvitter.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/qvitter.js b/js/qvitter.js index fb0ccc0..958a6d1 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -50,9 +50,14 @@ checkLocalStorage(); window.loggedIn = iterateRecursiveReplaceHtmlSpecialChars(window.loggedIn); // hack to supress basic auth popup, e.g. if the user has to tabs open and -// log out in one of them. but microsoft browsers doesn't support this -if(typeof bowser.msie == 'undefined' && typeof bowser.msedge == 'undefined') { - window.apiRoot = window.apiRoot.replace('://','://x:x@'); +// log out in one of them. but microsoft browsers and chrome 59+ doesn't support this +if(typeof bowser != 'undefined') { + var bowserIntVersion = parseInt(bowser.version,10); + if(typeof bowser.msie == 'undefined' + && typeof bowser.msedge == 'undefined' + && !(typeof bowser.chrome != 'undefined' && bowser.chrome === true && bowserIntVersion <= 59)) { + window.apiRoot = window.apiRoot.replace('://','://x:x@'); + } }