From 92f861104353667b685112cd4f2ca0925d34f6c9 Mon Sep 17 00:00:00 2001 From: cutls Date: Sat, 8 Feb 2020 01:10:45 +0900 Subject: [PATCH] cors --- app/js/ui/img.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/js/ui/img.js b/app/js/ui/img.js index 17a8994f..702d53a7 100644 --- a/app/js/ui/img.js +++ b/app/js/ui/img.js @@ -102,6 +102,13 @@ function imageXhr(id, key, murl) { }, false ) + xhr.addEventListener( + 'error', + function(event) { + $('#imgmodal').attr('src', murl) + }, + false + ) xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { r = new FileReader()