From 4c7a2a7ec35b02e991b75ae9b7bf23fee1445abc Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 31 Jul 2021 22:05:31 +0200 Subject: [PATCH] uridec alerts --- copyparty/web/browser.js | 4 ++-- copyparty/web/util.js | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index e3ed8f89..a536d8c8 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -1627,12 +1627,12 @@ var fileman = (function () { } if (exists.length) - alert('these ' + exists.length + ' items cannot be pasted here (names already exist):\n\n' + exists.join('\n')); + alert('these ' + exists.length + ' items cannot be pasted here (names already exist):\n\n' + uricom_adec(exists).join('\n')); if (!req.length) return; - if (!confirm('paste these ' + req.length + ' items here?\n\n' + req.join('\n'))) + if (!confirm('paste these ' + req.length + ' items here?\n\n' + uricom_adec(req).join('\n'))) return; function paster() { diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 72acb039..57bef25a 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -398,6 +398,15 @@ function uricom_dec(txt) { } +function uricom_adec(arr) { + ret = []; + for (var a = 0; a < arr.length; a++) + ret[a] = uricom_dec(arr[a])[0]; + + return ret; +} + + function get_evpath() { var ret = document.location.pathname;