Remove hack that's not neccessary anymore

This commit is contained in:
Niles Rogoff 2017-07-04 11:44:29 -07:00
parent 0a12beef16
commit 31b960a481
No known key found for this signature in database
GPG Key ID: B78B908F23430F80
1 changed files with 6 additions and 3 deletions

View File

@ -60,6 +60,7 @@ var onload = function () {
} else {
comparison_and_update_elem(key, closedreplies, a, elem, closed, oldreplies);
//elem.innerHTML = elem.innerHTML + " (cached)"; // debug
//elem.innerHTML = elem.innerHTML + grey("(c)");
}
}
}
@ -83,9 +84,11 @@ var xhr_and_key = (function xhr_and_key(board, a, id, key, oldreplies, closed, e
if(xmlHttp.readyState == 4 && xmlHttp.status == 200) {
var jsontext = xmlHttp.responseText;
jsontext = jsontext.replace(/(?:\r\n|\r|\n)/g, " ");
var idx = jsontext.indexOf("https://boards.dangeru.us/static");
while (jsontext[idx] != '}') idx++;
var b = jsontext.slice(0, idx) + '"' + jsontext.slice(idx);
// Workaround no longer needed after the api got fixed
//var idx = jsontext.indexOf("https://boards.dangeru.us/static");
//while (jsontext[idx] != '}') idx++;
//var b = jsontext.slice(0, idx) + '"' + jsontext.slice(idx);
var b = jsontext;
try {
var json = JSON.parse(b);
var replies = json.replies.length;