fix paytaca src link

This commit is contained in:
2qx
2023-02-21 20:41:25 -05:00
parent 05c521c9c5
commit 84d340ffab
3 changed files with 72 additions and 1 deletions
+2
View File
@@ -1,3 +1,5 @@
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
+17
View File
@@ -0,0 +1,17 @@
{
"name": "Awesome Bitcoin Cash",
"short_name": "🚀",
"description": "Bitcoin Cash (BCH) links",
"scope": "/",
"start_url": "/",
"background_color": "#8dc351",
"theme_color": "#8dc351",
"display": "standalone",
"icons": [
{
"src": "/assets/awesome-bitcoin-cash.png",
"type": "image/png",
"sizes": "700x700"
}
]
}
+52
View File
@@ -0,0 +1,52 @@
var GHPATH = '/';
var APP_PREFIX = 'awesome_bitcoin_';
var VERSION = 'version_002';
var URLS = [
`${GHPATH}/`,
`${GHPATH}/index.html`,
`${GHPATH}/assets/css/styles.css`,
`${GHPATH}/assets/awesome-bitcoin-cash.svg`,
`${GHPATH}/js/app.js`
]
var CACHE_NAME = APP_PREFIX + VERSION
self.addEventListener('fetch', function (e) {
console.log('Fetch request : ' + e.request.url);
e.respondWith(
caches.match(e.request).then(function (request) {
if (request) {
console.log('Responding with cache : ' + e.request.url);
return request
} else {
console.log('File is not cached, fetching : ' + e.request.url);
return fetch(e.request)
}
})
)
})
self.addEventListener('install', function (e) {
e.waitUntil(
caches.open(CACHE_NAME).then(function (cache) {
console.log('Installing cache : ' + CACHE_NAME);
return cache.addAll(URLS)
})
)
})
self.addEventListener('activate', function (e) {
e.waitUntil(
caches.keys().then(function (keyList) {
var cacheWhitelist = keyList.filter(function (key) {
return key.indexOf(APP_PREFIX)
})
cacheWhitelist.push(CACHE_NAME);
return Promise.all(keyList.map(function (key, i) {
if (cacheWhitelist.indexOf(key) === -1) {
console.log('Deleting cache : ' + keyList[i] );
return caches.delete(keyList[i])
}
}))
})
)
})