From b0feb62a0bbb5987fe37ab8bc26503c3dd812d84 Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Sat, 6 Jan 2024 19:16:12 -0500 Subject: public/js/app: Remove CSP violations --- public/js/app.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'public') diff --git a/public/js/app.js b/public/js/app.js index 0d540ce..d26d3e8 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -43,6 +43,17 @@ self.addEventListener('DOMContentLoaded', function() { localStorage['pager'] = JSON.stringify(pager); })(); + (function() { + var imageAnchors = document.querySelectorAll("a"); + for(var i = 0; i < imageAnchors.length; i++){ + if (imageAnchors[i].firstElementChild) { + if (imageAnchors[i].firstElementChild.tagName === "IMG") { + imageAnchors[i].removeAttribute("href"); + } + } + } + })(); + /** * Scroll events */ -- cgit v1.2.3