Commit 3c2ed0ae authored by Duhoux Pierre-Louis's avatar Duhoux Pierre-Louis

Fix image not even loading on firefox

parent 5cf81e5c
Pipeline #37774854 passed with stages
in 1 minute and 51 seconds
......@@ -67,15 +67,16 @@ if (typeof registerMangaObject === 'function') {
getImageFromPageAndWrite: function (urlImg, image) {
var xhr = new XMLHttpRequest();
if (urlImg.indexOf("//") === 0) urlImg = location.protocol + urlImg
xhr.open('GET', urlImg, true);
xhr.responseType = 'arraybuffer';
let self = this;
xhr.onload = function(e) {
var responseArray = new Uint8Array(this.response); // images are mri binry files
image.src = self.webPDecode(responseArray); // mri file contains encoded webp
};
xhr.send();
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment