From d27144340f411eea0f78b963dedba1aea5d6b5ef Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 7 Jul 2025 11:09:46 +0000 Subject: [PATCH] ie11 fix --- copyparty/web/up2k.js | 7 ++++--- copyparty/web/util.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index 8a8f393d..edf0eee8 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -2431,8 +2431,8 @@ function up2k_init(subtle) { try { orz(e); } catch (ex) { vis_exh(ex + '', 'up2k.js', '', '', ex); } }; - xhr.timeout = 34000; xhr.open('HEAD', t.purl + uricom_enc(t.name), true); + xhr.timeout = 34000; xhr.send(); } @@ -2911,7 +2911,8 @@ function up2k_init(subtle) { st.bytes.inflight += db; xhr.bsent = nb; - xhr.timeout = 64000 + Date.now() - xhr.t0; + if (!IE) + xhr.timeout = 64000 + Date.now() - xhr.t0; pvis.prog(t, pcar, nb); }; xhr.onload = function (xev) { @@ -2959,7 +2960,7 @@ function up2k_init(subtle) { xhr.bsent = 0; xhr.t0 = Date.now(); - xhr.timeout = 42000; + xhr.timeout = 1000 * (IE ? 1234 : 42); xhr.responseType = 'text'; xhr.send(t.fobj.slice(car, cdr)); } diff --git a/copyparty/web/util.js b/copyparty/web/util.js index ae4590ed..e5c3ff07 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -32,7 +32,7 @@ var wah = '', CHROME = !!window.chrome, // safari=false VCHROME = CHROME ? 1 : 0, UA = '' + navigator.userAgent, - IE = /Trident\//.test(UA), + IE = !!document.documentMode, FIREFOX = ('netscape' in window) && / rv:/.test(UA), IPHONE = TOUCH && /iPhone|iPad|iPod/i.test(UA), LINUX = /Linux/.test(UA),