Update console.html

This commit is contained in:
Namhyeon Go 2024-11-24 01:35:04 +09:00
parent 78eb86800c
commit e3b5a344e3

View File

@ -134,7 +134,12 @@
// for dirty response (e.g., magic header, advertise logo)
try {
var start = s.indexOf('{');
var end = s.lastIndexOf('}');
var end = [s.indexOf("}\r\n\r\n"), s.lastIndexOf('}')].reduce(function(x) {
if (x > 0 && a < x) {
a = x; // set new value if x greater than 0 and x less than previous value
}
return a;
}, s.length);
if (start > -1 && end > -1 && end > start) {
responseData = JSON.parse(s.substring(start, end + 1));
} else {