Skip to content

Commit

Permalink
Update EmbedMoreImages.plugin.js to v1.2
Browse files Browse the repository at this point in the history
Update EmbedMoreImages.plugin.js to v1.2
  • Loading branch information
Knewest authored Aug 26, 2023
1 parent d2cda51 commit be4994e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions EmbedMoreImages.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ module.exports = class EmbedMoreImages {
if (xhr && (xhr.readyState > 1 || xhr.status > 0)) {
stopFakeLoading();
}
}, 10000);
}, 100);

const observer = loadingBarElement && new MutationObserver(mutations => {
for (let mutation of mutations) {
Expand Down Expand Up @@ -376,19 +376,15 @@ module.exports = class EmbedMoreImages {

xhr.onerror = () => {
cleanup(observer);
if (xhr.status === 0) {
reject(new Error("CORS error or network issue."));
} else {
image.src = url;
}
image.src = url;
};

xhr.send();
} else {
image.src = url;
}
});
}
}


showImageModal(imageSrc) {
Expand Down

0 comments on commit be4994e

Please sign in to comment.