From 89ba12065c411091b1f271f72d18ac0b94a5bd66 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 3 Dec 2022 13:59:46 +0000 Subject: [PATCH] ssdp: add ie8 compat --- copyparty/web/browser.js | 2 +- copyparty/web/svcs.html | 2 +- copyparty/web/svcs.js | 14 +++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 123597f1..a6494c8b 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -4586,7 +4586,7 @@ document.onkeydown = function (e) { ], [ L.s_ta, - ["tags", "tags", L.s_t1, "30", "^ゲリラ$"] + ["tags", "tags", L.s_t1, "30", "^irui$"] ], [ L.s_ad, diff --git a/copyparty/web/svcs.html b/copyparty/web/svcs.html index 5b01eed5..ae45212a 100644 --- a/copyparty/web/svcs.html +++ b/copyparty/web/svcs.html @@ -53,7 +53,7 @@

note: if you are on LAN (or just dont have valid certificates), add --no-check-certificate to the mount command
---

{% endif %} -

if you want to use the native WebDAV client in windows instead (slow and buggy), first run webdav-cfg.bat to remove the 47 MiB filesize limit (also fixes password login), then connect:

+

if you want to use the native WebDAV client in windows instead (slow and buggy), first run webdav-cfg.bat to remove the 47 MiB filesize limit (also fixes latency and password login), then connect:

                 net use w: http{{ s }}://{{ ep }}/{{ vp }}{% if accs %} k /user:{{ pw }}{% endif %}
             
diff --git a/copyparty/web/svcs.js b/copyparty/web/svcs.js index 53de0fdb..7cece1b7 100644 --- a/copyparty/web/svcs.js +++ b/copyparty/web/svcs.js @@ -1,10 +1,18 @@ +function QSA(x) { + return document.querySelectorAll(x); +} +var LINUX = /Linux/.test(navigator.userAgent), + MACOS = /[^a-z]mac ?os/i.test(navigator.userAgent), + WINDOWS = /Windows/.test(navigator.userAgent); + + var oa = QSA('pre'); for (var a = 0; a < oa.length; a++) { var html = oa[a].innerHTML, nd = /^ +/.exec(html)[0].length, - rd = new RegExp('(^|\n) {' + nd + '}', 'g'); + rd = new RegExp('(^|\r?\n) {' + nd + '}', 'g'); - oa[a].innerHTML = html.replace(rd, '$1').replace(/[ \r\n]+$/, ''); + oa[a].innerHTML = html.replace(rd, '$1').replace(/[ \r\n]+$/, '').replace(/\r?\n/g, '
'); } @@ -14,7 +22,7 @@ for (var a = 0; a < oa.length; a++) function esetos(e) { ev(e); - setos(e.target.id.slice(1)); + setos(((e && e.target) || (window.event && window.event.srcElement)).id.slice(1)); } function setos(os) {