From 061d8ed6eb389a9bf4fbe0b758a4c7a3f256425c Mon Sep 17 00:00:00 2001 From: simon987 Date: Tue, 27 Aug 2019 15:57:52 -0400 Subject: [PATCH] hotfix for *chan links --- index.html | 2 +- js/main.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index de82fc2..3a2a36e 100644 --- a/index.html +++ b/index.html @@ -169,7 +169,7 @@ - + diff --git a/js/main.js b/js/main.js index 0ee73bb..28310dd 100644 --- a/js/main.js +++ b/js/main.js @@ -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