diff options
author | FChannel0 <77419041+FChannel0@users.noreply.github.com> | 2021-07-03 16:17:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 16:17:15 -0700 |
commit | a3f45e6a5cb85a43364756bd28a14936d1d95ae7 (patch) | |
tree | 248da60cd32e9b65b96c9e89e2cc3b804d27e63e /static/js/footerscript.js | |
parent | 875ee4c53d79918ac87d1ce3e208ad27db6c0a90 (diff) | |
parent | 8e3e745c2a8e9f1db6d15a67829b2aa320731c3f (diff) |
Merge pull request #32 from the-sageman/autoreload
Implement auto-reload
Diffstat (limited to 'static/js/footerscript.js')
-rw-r--r-- | static/js/footerscript.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/static/js/footerscript.js b/static/js/footerscript.js index a63f422..69e56e7 100644 --- a/static/js/footerscript.js +++ b/static/js/footerscript.js @@ -3,34 +3,34 @@ var imgArray = [].slice.call(imgs); imgArray.forEach(function(img, i){ img.addEventListener("click", function(e){ - var id = img.getAttribute("id") - var media = document.getElementById("media-" + id) - var sensitive = document.getElementById("sensitive-" + id) + var id = img.getAttribute("id"); + var media = document.getElementById("media-" + id); + var sensitive = document.getElementById("sensitive-" + id); if(img.getAttribute("enlarge") == "0") { - var attachment = img.getAttribute("attachment") + var attachment = img.getAttribute("attachment"); img.setAttribute("enlarge", "1"); img.setAttribute("style", "float: left; margin-right: 10px; cursor: pointer;"); - img.src = attachment + img.src = attachment; } else { - var preview = img.getAttribute("preview") + var preview = img.getAttribute("preview"); img.setAttribute("enlarge", "0"); if(img.getAttribute("main") == 1) { img.setAttribute("style", "float: left; margin-right: 10px; max-width: 250px; max-height: 250px; cursor: pointer;"); - img.src = preview + img.src = preview; } else { img.setAttribute("style", "float: left; margin-right: 10px; max-width: 125px; max-height: 125px; cursor: pointer;"); - img.src = preview + img.src = preview; } } }); -}) +}); function viewLink(board, actor) { @@ -38,7 +38,7 @@ function viewLink(board, actor) { var postsArray = [].slice.call(posts); postsArray.forEach(function(p, i){ - var id = p.getAttribute("post") - p.href = "/" + board + "/" + shortURL(actor, id) - }) + var id = p.getAttribute("post"); + p.href = "/" + board + "/" + shortURL(actor, id); + }); } |