mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 12:19:46 -04:00
Ensure closest matching wiki archive type is included
Former-commit-id: c0730a9257610d637819204da0488dbdf243ef22 [formerly 89ce0a28081755a46ea77a9c4bf4323f487c3c17] [formerly 5e6748343c6935e92b4bd3529cba48ef06532038] [formerly 084bac2386b8ea609b275cbc74b2ec935c3b66b2 [formerly dad39322f7ddb6e37c5fcd00b1db4d1d9225ea4a [formerly 9f60ed5da9751aa4487d652e440d283c9dc60a56]]] Former-commit-id: a81f992c9193316bc89dc1b7b28f6643a7f2dbd1 [formerly e2b4e2ccffd9c3b99ddaf60ac36974cf2a74b904 [formerly cf0b96b253872122195a3a728dbf1798745ef317]] Former-commit-id: e05fbc1d0c3b4e913cf17924680efc0d376e84d8 [formerly 0d7a69680648210d58f2b51c1b15e2252a7b41fd] Former-commit-id: 57c0b584bad578e9ab04afa47d68e455856b082b
This commit is contained in:
parent
b576dfb2cb
commit
3d25556091
@ -57,6 +57,7 @@ params['fileVersion'] = getSetting('fileVersion') || "wikipedia_en_100_maxi_2021
|
||||
// List of known start pages cached in the FS:
|
||||
params['cachedStartPages'] = {
|
||||
'wikipedia_en_medicine-app_maxi': 'A/Wikipedia:WikiProject_Medicine/Open_Textbook_of_Medicine',
|
||||
'wikipedia_en_medicine_maxi': 'A/Wikipedia:WikiProject_Medicine/Open_Textbook_of_Medicine',
|
||||
'wikivoyage_en_all_maxi': 'A/Main_Page'
|
||||
};
|
||||
params['kiwixDownloadLink'] = "https://download.kiwix.org/zim/"; //Include final slash
|
||||
@ -254,7 +255,7 @@ function getAppType() {
|
||||
|
||||
// Set up storage types
|
||||
// First check that we have not simply upgraded the app and the packaged file
|
||||
params.packagedFileStub = params.packagedFile ? params.packagedFile.replace(/_[\d-]+\.zim\w?\w?$/, ''): null;
|
||||
params.packagedFileStub = params.packagedFile ? params.packagedFile.replace(/(?:-app_maxi)?_[\d-]+\.zim\w?\w?$/, ''): null;
|
||||
if (params.packagedFileStub && params.version !== getSetting('version') && ~params.storedFile.indexOf(params.packagedFileStub)) {
|
||||
console.log('The packaged archive has been upgraded: resetting file pointers to point to ' + params.packagedFile);
|
||||
params.lastPageVisit = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user