hotfix for *chan links

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

View File

@ -169,7 +169,7 @@
</div>
<script src="js/materialize.min.js"></script>
<script src="js/main.js?v=1.3"></script>
<script src="js/main.js?v=1.3.1"></script>
</body>
</html>

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