From c696db3e84d91092182adbeb7eef6126fad6be5d Mon Sep 17 00:00:00 2001 From: James Taylor Date: Tue, 20 Oct 2020 18:24:41 -0700 Subject: comments.js: include error in reply html rather than using an alert --- youtube/static/js/common.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'youtube/static') diff --git a/youtube/static/js/common.js b/youtube/static/js/common.js index 2db4390..20cfddd 100644 --- a/youtube/static/js/common.js +++ b/youtube/static/js/common.js @@ -41,9 +41,7 @@ function doXhr(url, callback=null) { var xhr = new XMLHttpRequest(); xhr.open("GET", url); xhr.onload = (e) => { - let ok = xhr.status >= 200 && xhr.status < 300; - if (ok) callback(e.currentTarget.response); - else alert(`${xhr.responseURL} status code: ${xhr.status}`); + callback(e.currentTarget.response); } xhr.send(); return xhr; -- cgit v1.2.3