diff --git a/packet/static/js/pfp-zoom.js b/packet/static/js/pfp-zoom.js new file mode 100644 index 0000000..3e80b5f --- /dev/null +++ b/packet/static/js/pfp-zoom.js @@ -0,0 +1,36 @@ +$(document).ready(function () { + let photos = Array.from(document.querySelectorAll('.eval-user-img')) + + top.onclick = function (e) { + let tsib = e.target.previousElementSibling + if (tsib != null) { + if (tsib.classList.contains('eval-user-img')) { + return; + } + } + if (e.target.classList.contains('eval-user-img')) { + return; + } + document.querySelector('#zoom-photo').remove() + } + + photos.forEach((photo) => { + photo.addEventListener('click', (e) => { + let other = document.querySelector('#zoom-photo') + if (other != null) { + other.remove() + } + photo.insertAdjacentHTML('afterend', ` +