From 61c52c223786f768da936e5bcab31c653e56c8cc Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 30 Dec 2023 14:20:03 +0000 Subject: [PATCH] [index] less jquery --- ext/index/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/index/script.js b/ext/index/script.js index 5e7cb622..a599a97e 100644 --- a/ext/index/script.js +++ b/ext/index/script.js @@ -29,11 +29,11 @@ document.addEventListener('DOMContentLoaded', () => { * This allows us to cache the same thumb for all query * strings, adding the query in the browser. */ - $(".shm-image-list").each(function(idx, elm) { - var query = $(this).data("query"); + document.querySelectorAll(".shm-image-list").forEach(function(list) { + var query = list.getAttribute("data-query"); if(query) { - $(this).find(".shm-thumb-link").each(function(idx2, elm2) { - $(this).attr("href", $(this).attr("href") + query); + list.querySelectorAll(".shm-thumb-link").forEach(function(thumb) { + thumb.setAttribute("href", thumb.getAttribute("href") + query); }); } });