Skip to content

Commit 5fb4c76

Browse files
committed
..ok, fixed offline.
1 parent 986ee06 commit 5fb4c76

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"liveServer.settings.port": 5501
3+
}

data/ai.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
* [AIToolsDB](https://aitoolsdb.com/) - A search engine for AI tools categorized for various use cases.
2626
* [AiToolHunt](https://www.aitoolhunt.com/) - Discover the best AI tools for your business needs.
2727
* [AI Tools Directory](https://aitoolsdirectory.com/) - A comprehensive directory of AI tools categorized by use case.
28-
---
2928

3029
### Free AI Tools
3130

@@ -65,7 +64,6 @@
6564
* [Paper Digest](https://paperdigest.org/) - Free AI tool for summarizing academic papers.
6665
* [Scite](https://scite.ai/) - An AI tool for discovering and evaluating scientific articles.
6766
* [Iris.ai](https://iris.ai/) - An AI assistant for literature reviews and research discovery.
68-
---
6967

7068
### Paid/Enterprise AI Tools
7169

@@ -74,7 +72,7 @@
7472
* [Jasper AI](https://www.jasper.ai/) - Advanced content generation tool for businesses.
7573
* [Frase](https://www.frase.io/) - An AI-powered content optimization tool for SEO and content marketing.
7674
* [MarketMuse](https://www.marketmuse.com/) - An AI-driven content research and optimization platform.
77-
---
75+
7876

7977
### Open-Source AI Libraries
8078

serviceWorker.js

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
const CACHE_NAME = "codehubx-cache-v1";
2-
const urlsToCache = [
3-
"/",
4-
"/index.html",
5-
"/styles/style.css",
6-
"/scripts/main.js",
7-
"https://cdn.jsdelivr.net/npm/[email protected]/dist/showdown.min.js",
8-
"/data/README.md",
9-
"/data/summary.md",
10-
"/data/ai.md",
11-
"/data/entertainment.md",
12-
"/data/piracy.md",
13-
"/data/free-resources.md",
14-
"/data/github-repos.md",
15-
"/data/tools.md",
16-
"/data/fake-identity.md",
17-
];
2+
const urlsToCache = ["/", "/index.html", "/styles/style.css", "/scripts/main.js", "https://cdn.jsdelivr.net/npm/[email protected]/dist/showdown.min.js", "/data/README.md", "/data/summary.md", "/data/ai.md", "/data/entertainment.md", "/data/piracy.md", "/data/free-resources.md", "/data/github-repos.md", "/data/tools.md", "/data/fake-identity.md", "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined", "https://fonts.googleapis.com/css2?family=Titillium+Web:wght@600&display=swap", "https://fonts.googleapis.com/css2?family=Space+Grotesk:[email protected]&display=swap", "https://fonts.googleapis.com/css2?family=Nabla&display=swap"];
183

194
self.addEventListener("install", (event) => {
205
event.waitUntil(
21-
caches.open(CACHE_NAME).then((cache) => {` `
6+
caches.open(CACHE_NAME).then((cache) => {
227
return cache.addAll(urlsToCache);
238
})
249
);
2510
});
2611

2712
self.addEventListener("fetch", (event) => {
2813
event.respondWith(
29-
caches.match(event.request).then((response) => {
30-
return response || fetch(event.request);
31-
})
14+
caches
15+
.match(event.request)
16+
.then((response) => {
17+
return (
18+
response ||
19+
fetch(event.request).then((response) => {
20+
return caches.open(CACHE_NAME).then((cache) => {
21+
cache.put(event.request, response.clone());
22+
return response;
23+
});
24+
})
25+
);
26+
})
27+
.catch(() => {
28+
return caches.match("/index.html");
29+
})
3230
);
3331
});
3432

0 commit comments

Comments
 (0)