From 12a638750e47b747570a2f8fdcea9f013594ecf3 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Mon, 10 Oct 2022 13:37:56 +0400 Subject: [PATCH] Fixed URLs to static resources without cacheids One (hopefully, last) remaining relative URL to a static resource is the reference to ./search-icon.svg found in skin/index.css to which KIWIXCACHEID could not be applied because of the limitations of the resource preprocessing script `kiwix-resources`. --- static/templates/index.html | 2 +- static/viewer.html | 4 ++-- test/server.cpp | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/static/templates/index.html b/static/templates/index.html index 42bbc6a1..2bd067a2 100644 --- a/static/templates/index.html +++ b/static/templates/index.html @@ -13,7 +13,7 @@ - + diff --git a/static/viewer.html b/static/viewer.html index 74ab8814..65f25d9a 100644 --- a/static/viewer.html +++ b/static/viewer.html @@ -16,7 +16,7 @@ } const root = getRootLocation(); - const blankPageUrl = `${root}/skin/blank.html`; + const blankPageUrl = root + "/skin/blank.html?KIWIXCACHEID"; if ( location.hash == '' ) { location.href = root + '/'; @@ -58,7 +58,7 @@ diff --git a/test/server.cpp b/test/server.cpp index eee1dc64..d909f78d 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -222,7 +222,7 @@ R"EXPECTEDRESULT( href="/ROOT/skin/index.css?cacheid=3b470cee" - + @@ -247,8 +247,9 @@ R"EXPECTEDRESULT( - const blankPageUrl = `${root}/skin/blank.html`; + const blankPageUrl = root + "/skin/blank.html?cacheid=6b1fa032"; + src="./skin/blank.html?cacheid=6b1fa032" title="ZIM content" width="100%" )EXPECTEDRESULT" }, {