hotfix for *chan links

This commit is contained in:
2019-08-27 15:57:52 -04:00
parent bd16446de4
commit 061d8ed6eb
2 changed files with 6 additions and 4 deletions

View File

@@ -140,9 +140,11 @@ function createImage(src, j) {
const img = document.createElement("img");
img.setAttribute("class", "img");
img.setAttribute("src", src);
img.onclick = function () {
window.open("https://reddit.com/" + j["id"]);
};
if (exchange === "reddit") {
img.onclick = function () {
window.open("https://reddit.com/" + j["id"]);
};
}
img.onerror = function () {
//Don't display broken images