From 7715299dd36fb607815170ce2bf2c5df4ef7c001 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 30 Sep 2021 19:35:56 +0200 Subject: [PATCH] dont show entire web pages in toasts --- copyparty/web/util.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 2bdd3181..a0b89fe2 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -905,6 +905,9 @@ var toast = (function () { if (sec) te = setTimeout(r.hide, sec * 1000); + if (txt.indexOf('') + 1) + txt = txt.slice(0, txt.indexOf('<')) + ' [...]'; + obj.innerHTML = 'x
' + lf2br(txt) + '
'; obj.className = cl; sec += obj.offsetWidth;