Skip to content

Commit 9a1a2ed

Browse files
Release 20250621
1 parent 70816a1 commit 9a1a2ed

File tree

7 files changed

+18
-2
lines changed

7 files changed

+18
-2
lines changed

hlp/Help-cs.zip

784 Bytes
Binary file not shown.

hlp/Help-en.zip

745 Bytes
Binary file not shown.

hvdata/appmain.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ const STO_HELP = 'STO_HELP';
33
const STOF_TEXT = 'text';
44
const STOF_B64 = 'base64';
55

6+
const DATA_FILE_PATH_BASE = 'hvdata/data';
7+
68
const STORAGE_ENGINES = {
79
'.zip': async (path) => newStorageZip(path),
810
'/': async (path) => newStorageDir(path),
@@ -166,7 +168,13 @@ async function newStorageDir(path) {
166168
}
167169

168170
async function main() {
169-
var st = await _Storage.add(STO_DATA, 'hvdata/data.zip');
171+
var st = null;
172+
173+
try {
174+
st = await _Storage.add(STO_DATA, `${DATA_FILE_PATH_BASE}.zip`);
175+
} catch (error) {
176+
st = await _Storage.add(STO_DATA, `${DATA_FILE_PATH_BASE}/`);
177+
}
170178
const srcT = await _Storage.search(STO_DATA, 'appmainRun.js');
171179
appendJavaScript('appRun', srcT, document.body);
172180
runApp();

hvdata/data.zip

3.03 KB
Binary file not shown.

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<meta property="og:description" content="Help Viewer help file.">
1515
<meta property="og:type" content="website">
1616
<meta property="og:image" content="favicon.png">
17+
<meta name="robots" content="index,follow">
1718
</head>
1819
<script>
1920
if ('serviceWorker' in navigator) {

robots.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
User-agent: *
2+
Disallow: /
3+
Allow: /hlp/
4+
Allow: /index.html
5+
Allow: /sitemap.xml
6+
Allow: /favicon.png
7+
Allow: /faviconPWA.png

sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const CACHE_NAME = 'helpviewer-cache-v1';
2-
const CACHE_FILES = [ '/faviconPWA.png','/manifest.webmanifest','/hvdata/jszip.min.js','/hvdata/data.zip','/hvdata/LICENSE-jszip.md','/hvdata/appmain.js','/index.html','/favicon.png' ];
2+
const CACHE_FILES = [ '/faviconPWA.png','/manifest.webmanifest','/hvdata/jszip.min.js','/hvdata/data.zip','/hvdata/LICENSE-jszip.md','/hvdata/appmain.js','/index.html','/favicon.png','/robots.txt' ];
33

44
self.addEventListener('install', (event) => {
55
event.waitUntil(

0 commit comments

Comments
 (0)