Only use Qt bug workaround in the viewer

This commit is contained in:
Kovid Goyal 2019-11-03 07:16:17 +05:30
parent a179632356
commit c17411a39f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -48,7 +48,7 @@ def absolute_path(path):
def workaround_qt_bug(xhr, end_type, ok_code=200):
if end_type is 'error' and xhr.status is ok_code:
if end_type is 'error' and xhr.status is ok_code and window.navigator.userAgent.indexOf('calibre-viewer') is 0:
end_type = 'load'
return end_type