mirror of
https://github.com/9001/copyparty.git
synced 2026-03-18 06:03:53 +10:00
dont show entire web pages in toasts
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user