Skip to content

Commit

Permalink
Ensure landing pages of Zimit ZIMs also get theme change
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Dec 11, 2023
1 parent 9c1172e commit 12f03ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4951,6 +4951,8 @@ var articleLoadedSW = function (dirEntry, iframeArticleContent) {
setupTableOfContents();
listenForSearchKeys();
}
// Note that switchCSSTheme() requires access to params.lastPageVisit
params.lastPageVisit = dirEntry.namespace + '/' + dirEntry.url + '@kiwixKey@' + appstate.selectedArchive.file.name;
switchCSSTheme();
if (appstate.selectedArchive.zimType === 'open') {
// Set relative font size + Stackexchange-family multiplier
Expand Down Expand Up @@ -5004,8 +5006,6 @@ var articleLoadedSW = function (dirEntry, iframeArticleContent) {
settingsStore.setItem('lastPageLoad', 'OK', Infinity);
if (!appstate.isReplayWorkerAvailable) {
// Because this is loading within docBody, it should only get set for HTML documents
// For loads using the Replay Worker, we set this in handleClickedOnReplayLink()
params.lastPageVisit = dirEntry.namespace + '/' + dirEntry.url + '@kiwixKey@' + appstate.selectedArchive.file.name;
if (params.rememberLastPage) settingsStore.setItem('lastPageVisit', params.lastPageVisit, Infinity);
}
uiUtil.clearSpinner();
Expand Down

0 comments on commit 12f03ea

Please sign in to comment.