aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/static/js
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2020-10-20 18:24:41 -0700
committerJames Taylor <user234683@users.noreply.github.com>2020-10-20 18:24:41 -0700
commitc696db3e84d91092182adbeb7eef6126fad6be5d (patch)
tree7ac3af26887bc5350c9e2b20a65f86ffeed1a556 /youtube/static/js
parent95f2f027eabdcc4dc3c1a77829bf2bf503ed2939 (diff)
downloadyt-local-c696db3e84d91092182adbeb7eef6126fad6be5d.tar.lz
yt-local-c696db3e84d91092182adbeb7eef6126fad6be5d.tar.xz
yt-local-c696db3e84d91092182adbeb7eef6126fad6be5d.zip
comments.js: include error in reply html rather than using an alert
Diffstat (limited to 'youtube/static/js')
-rw-r--r--youtube/static/js/common.js4
1 files changed, 1 insertions, 3 deletions
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;