mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
dont show entire web pages in toasts
This commit is contained in:
parent
b8ac9b7994
commit
7715299dd3
|
@ -905,6 +905,9 @@ var toast = (function () {
|
|||
if (sec)
|
||||
te = setTimeout(r.hide, sec * 1000);
|
||||
|
||||
if (txt.indexOf('<body>') + 1)
|
||||
txt = txt.slice(0, txt.indexOf('<')) + ' [...]';
|
||||
|
||||
obj.innerHTML = '<a href="#" id="toastc">x</a><div id="toastb">' + lf2br(txt) + '</div>';
|
||||
obj.className = cl;
|
||||
sec += obj.offsetWidth;
|
||||
|
|
Loading…
Reference in a new issue