From b28bfe64c04c1e27cdb4fbaaa630e0627c32c205 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 20 Aug 2023 22:09:00 +0200 Subject: [PATCH] explain apple bullshit --- copyparty/web/baguettebox.js | 9 +++++++-- copyparty/web/browser.js | 23 ++++++++++++++--------- copyparty/web/util.js | 3 ++- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/copyparty/web/baguettebox.js b/copyparty/web/baguettebox.js index 10a318c8..f63b76c8 100644 --- a/copyparty/web/baguettebox.js +++ b/copyparty/web/baguettebox.js @@ -376,7 +376,12 @@ window.baguetteBox = (function () { else (vid() || ebi('bbox-overlay')).requestFullscreen(); } - catch (ex) { alert(ex); } + catch (ex) { + if (IPHONE) + alert('sorry, apple decided to make this impossible on iphones (should work on ipad tho)'); + else + alert(ex); + } } function tglsel() { @@ -968,7 +973,7 @@ window.baguetteBox = (function () { clmod(btnPrev, 'off', 't'); clmod(btnNext, 'off', 't'); - if (Date.now() - ctime <= 500) + if (Date.now() - ctime <= 500 && !IPHONE) tglfull(); ctime = Date.now(); diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 15c78bc3..555e93a3 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -1138,16 +1138,16 @@ ebi('op_cfg').innerHTML = ( '
\n' + '

' + L.cl_favico + ' 🎉

\n' + '
\n' + - ' ' + - ' ' + - ' ' + + ' ' + + ' ' + + ' ' + ' \n' + '
\n' + '
\n' + '
\n' + '

' + L.cl_bigdir + '

\n' + '
\n' + - ' ' + + ' ' + ' ask\n' + ' \n' + '
\n' + @@ -1335,7 +1335,7 @@ var mpl = (function () { ) : '') + '

' + L.ml_tint + '

' + - '' + + '' + '
' + '

' + L.ml_eq + '

'); @@ -2125,6 +2125,11 @@ var vbar = (function () { lastv = Date.now(); mp.setvol(mul); r.draw(); + + setTimeout(function () { + if (IPHONE && mp.au && mul < 0.9 && mp.au.volume == 1) + toast.inf(6, 'volume doesnt work because apple says no'); + }, 1); } can.onmousedown = function (e) { if (e.button !== 0) @@ -2713,7 +2718,7 @@ var afilt = (function () { html.push('+'); h2.push('' + vs[a][1] + ''); h4.push(''); - h3.push(''); + h3.push(''); } html = html.join('\n') + ''; html += h2.join('\n') + ''; @@ -3423,8 +3428,8 @@ var fileman = (function () { '', - '', - '', + '', + '', '
regex
format
regex
format
preset', '', '', @@ -4912,7 +4917,7 @@ document.onkeydown = function (e) { for (var a = 0; a < trs.length; a += 2) { html.push('' + (trs[a].concat(trs[a + 1])).join('\n') + '
'); } - html.push('
raw
'); + html.push('
raw
'); ebi('srch_form').innerHTML = html.join('\n'); var o = QSA('#op_search input'); diff --git a/copyparty/web/util.js b/copyparty/web/util.js index b40b0990..2ecab4b1 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -7,6 +7,7 @@ if (!window.console || !console.log) var wah = '', + NOAC = 'autocorrect="off" autocapitalize="off"', L, tt, treectl, thegrid, up2k, asmCrypto, hashwasm, vbar, marked, CB = '?_=' + Date.now(), R = SR.slice(1), @@ -1565,7 +1566,7 @@ var modal = (function () { cb_ok = cok; cb_ng = cng === undefined ? cok : null; cb_up = fun; - html += '
' + ok_cancel + '
'; + html += '
' + ok_cancel + '
'; r.show(html); ebi('modali').value = v || '';