From 4f3ec817db4f3e132b0ddceec0374b1b10d2f16a Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 17 Nov 2021 15:23:36 +0100 Subject: [PATCH] Update `index.js` to not use jquery anymore. --- static/skin/index.js | 4 ++-- static/templates/index.html | 18 ------------------ test/server.cpp | 8 ++------ 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/static/skin/index.js b/static/skin/index.js index 80ad0e77d..fd1c338ea 100644 --- a/static/skin/index.js +++ b/static/skin/index.js @@ -1,5 +1,5 @@ (function() { - const root = $(`link[type='root']`).attr('href'); + const root = document.querySelector(`link[type='root']`).getAttribute('href'); const incrementalLoadingParams = { start: 0, count: viewPortToCount() @@ -320,7 +320,7 @@ const booksToFilter = new Set(); const booksToDelete = new Set(); iso.arrange({ - filter: function (idx, elem) { + filter: function (elem) { const id = elem.getAttribute('data-id'); const retVal = bookOrderMap.has(id); if (retVal) { diff --git a/static/templates/index.html b/static/templates/index.html index cd4c63d3b..92ae7d7df 100644 --- a/static/templates/index.html +++ b/static/templates/index.html @@ -4,24 +4,6 @@ Welcome to Kiwix Server - - - - testData{ { /* url */ "/ROOT/", -R"EXPECTEDRESULT( src="/ROOT/skin/jquery-ui/external/jquery/jquery.js?cacheid=1d85f0f3" - src="/ROOT/skin/jquery-ui/jquery-ui.min.js?cacheid=d927c2ff" - href="/ROOT/skin/jquery-ui/jquery-ui.min.css?cacheid=e1de77b3" - href="/ROOT/skin/jquery-ui/jquery-ui.theme.min.css?cacheid=2a5841f9" - href="/ROOT/skin/index.css?cacheid=56e818cd" +R"EXPECTEDRESULT( href="/ROOT/skin/index.css?cacheid=56e818cd" src: url("/ROOT/skin/fonts/Poppins.ttf?cacheid=af705837") format("truetype"); src: url("/ROOT/skin/fonts/Roboto.ttf?cacheid=84d10248") format("truetype"); - + )EXPECTEDRESULT" }, {