mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
tweaks
This commit is contained in:
parent
5562de330f
commit
99ac324fbd
|
@ -37,7 +37,7 @@ try {
|
||||||
var hook = function (t) {
|
var hook = function (t) {
|
||||||
var orig = console[t].bind(console),
|
var orig = console[t].bind(console),
|
||||||
cfun = function () {
|
cfun = function () {
|
||||||
console.hist.push(Date.now() + ' ' + t + ' ' + Array.from(arguments).join(', '));
|
console.hist.push(Date.now() + ' ' + t + ': ' + Array.from(arguments).join(', '));
|
||||||
if (console.hist.length > 100)
|
if (console.hist.length > 100)
|
||||||
console.hist = console.hist.slice(50);
|
console.hist = console.hist.slice(50);
|
||||||
|
|
||||||
|
@ -69,11 +69,10 @@ function vis_exh(msg, url, lineNo, columnNo, error) {
|
||||||
|
|
||||||
crashed = true;
|
crashed = true;
|
||||||
window.onerror = undefined;
|
window.onerror = undefined;
|
||||||
var con = is_touch ? '' : '<br /> (and if you can, press F12 and include the "Console" tab in the screenshot too)',
|
var html = [
|
||||||
html = [
|
|
||||||
'<h1>you hit a bug!</h1>',
|
'<h1>you hit a bug!</h1>',
|
||||||
'<p style="font-size:1.3em;margin:0">try to <a href="#" onclick="localStorage.clear();location.reload();">reset copyparty settings</a> if you are stuck here, or <a href="#" onclick="ignex();">ignore this</a> / <a href="#" onclick="ignex(true);">ignore all</a></p>',
|
'<p style="font-size:1.3em;margin:0">try to <a href="#" onclick="localStorage.clear();location.reload();">reset copyparty settings</a> if you are stuck here, or <a href="#" onclick="ignex();">ignore this</a> / <a href="#" onclick="ignex(true);">ignore all</a></p>',
|
||||||
'<p style="color:#fff">please send me a screenshot arigathanks gozaimuch: <code>ed/irc.rizon.net</code> or <code>ed#2644</code>' + con + '</p>',
|
'<p style="color:#fff">please send me a screenshot arigathanks gozaimuch: <code>ed/irc.rizon.net</code> or <code>ed#2644</code></p>',
|
||||||
'<p class="b">' + esc(url + ' @' + lineNo + ':' + columnNo), '<br />' + esc(String(msg)) + '</p>',
|
'<p class="b">' + esc(url + ' @' + lineNo + ':' + columnNo), '<br />' + esc(String(msg)) + '</p>',
|
||||||
'<p><b>UA:</b> ' + esc(navigator.userAgent + '')
|
'<p><b>UA:</b> ' + esc(navigator.userAgent + '')
|
||||||
];
|
];
|
||||||
|
@ -118,7 +117,7 @@ function vis_exh(msg, url, lineNo, columnNo, error) {
|
||||||
|
|
||||||
if (console.hist.length) {
|
if (console.hist.length) {
|
||||||
html.push('<p class="b"><b>console:</b><ul><li>' + Date.now() + ' @</li>');
|
html.push('<p class="b"><b>console:</b><ul><li>' + Date.now() + ' @</li>');
|
||||||
for (var a = console.hist.length - 1, aa = Math.max(0, console.hist.length - 10); a >= aa; a--)
|
for (var a = console.hist.length - 1, aa = Math.max(0, console.hist.length - 20); a >= aa; a--)
|
||||||
html.push('<li>' + esc(console.hist[a]) + '</li>');
|
html.push('<li>' + esc(console.hist[a]) + '</li>');
|
||||||
html.push('</ul>')
|
html.push('</ul>')
|
||||||
}
|
}
|
||||||
|
@ -1064,7 +1063,7 @@ function repl_load() {
|
||||||
getpres();
|
getpres();
|
||||||
ipre.value = val;
|
ipre.value = val;
|
||||||
};
|
};
|
||||||
ipre.oninput = function () {
|
ipre.oninput = ipre.onchange = function () {
|
||||||
tb.value = last_repl = ipre.value;
|
tb.value = last_repl = ipre.value;
|
||||||
};
|
};
|
||||||
tb.oninput = function () {
|
tb.oninput = function () {
|
||||||
|
|
Loading…
Reference in a new issue