diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 062bc92f..4c16e181 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -318,7 +318,10 @@ var Ls = { "u_ehssrch": "server rejected the request to perform search", "u_ehsinit": "server rejected the request to initiate upload", "u_ehsdf": "server ran out of disk space!\n\nwill keep retrying, in case someone\nfrees up enough space to continue", - "u_emtleak": "it looks like your webbrowser may have a memory leak;\nplease try the following:\n
F5
to refresh the pagemt
button in the ⚙️ settings
F5
to refresh the pagemt
button in the ⚙️ settings
WARNING: turbo enabled, client may not detect and resume incomplete uploads; see turbo-button tooltip
', @@ -657,7 +660,10 @@ var Ls = { "u_ehssrch": "server nektet forespørselen om å utføre søk", "u_ehsinit": "server nektet forespørselen om å begynne en ny opplastning", "u_ehsdf": "serveren er full!\n\nprøver igjen regelmessig,\ni tilfelle noen rydder litt...", - "u_emtleak": "uff, det er mulig at nettleseren din har en minnelekkasje...\nForeslår at du prøver følgende:\nmt
bryteren under ⚙️ innstillinger
mt
bryteren under ⚙️ innstillinger
ADVARSEL: turbo er på, avbrutte opplastninger vil muligens ikke oppdages og gjenopptas; hold musepekeren over turbo-knappen for mer info
', diff --git a/copyparty/web/ui.css b/copyparty/web/ui.css index ce12fc83..b0c55194 100644 --- a/copyparty/web/ui.css +++ b/copyparty/web/ui.css @@ -251,6 +251,9 @@ html.y #tth { padding: .3em; text-align: center; } +#modalc a { + color: #07b; +} #modalb { position: sticky; text-align: right; diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index 6e7ee281..f34127af 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -808,7 +808,7 @@ function up2k_init(subtle) { bcfg_bind(uc, 'turbo', 'u2turbo', turbolvl > 1, draw_turbo, false); bcfg_bind(uc, 'datechk', 'u2tdate', turbolvl < 3, null, false); bcfg_bind(uc, 'az', 'u2sort', u2sort.indexOf('n') + 1, set_u2sort, false); - bcfg_bind(uc, 'hashw', 'hashw', !!window.WebAssembly, set_hashw, false); + bcfg_bind(uc, 'hashw', 'hashw', !!window.WebAssembly && (!HTTPS || !CHROME || MOBILE), set_hashw, false); var st = { "files": [], @@ -1371,7 +1371,8 @@ function up2k_init(subtle) { return; st.oserr = true; - modal.alert(L.u_emtleak); + var msg = HTTPS ? L.u_emtleak3 : L.u_emtleak2.format((window.location + '').replace(':', 's:')); + modal.alert(L.u_emtleak1 + msg + L.u_emtleak4); } ///// diff --git a/copyparty/web/w.hash.js b/copyparty/web/w.hash.js index bd6e551e..ff851d18 100644 --- a/copyparty/web/w.hash.js +++ b/copyparty/web/w.hash.js @@ -41,6 +41,7 @@ onmessage = (d) => { reader.onload = function (e) { try { // chrome gc forgets the filereader output; remind it + // (for some chromes, also necessary for subtle) gc1 = e.target.result; gc2 = new Uint8Array(gc1, 0, 1); gc3 = new Uint8Array(gc1, gc1.byteLength - 1); @@ -95,6 +96,7 @@ onmessage = (d) => { if (subtle) subtle.digest('SHA-512', buf).then(hash_done); else { + // note: lifting u8buf counterproductive for the chrome gc bug var u8buf = new Uint8Array(buf); hashwasm.sha512(u8buf).then(function (v) { hash_done(hex2u8(v))