Commit 55fa17b9 by o.kimura

TAKUMI

parent 1f32db08
const CACHE_NAME = 'pwa-kousui-caches-v1.0.2';
const urlsToCache = [
"https://www.sanitary-net.com/app/takumi-style/",
"https://www.sanitary-net.com/app/takumi-style/index.html",
"https://www.sanitary-net.com/app/takumi-style/ws.js",
"https://www.sanitary-net.com/app/takumi-style/js/main.js",
"https://www.sanitary-net.com/app/takumi-style/css/main.css",
"https://www.sanitary-net.com/app/takumi-style/images/doctor_smile.png",
"https://www.sanitary-net.com/app/takumi-style/takumi_smile.png"
];
self.addEventListener('install', function (event) {
event.waitUntil(
caches.open(CACHE_NAME)
.then(
function (cache) {
return cache.addAll(urlsToCache);
})
);
});
self.addEventListener('fetch', function (event) {
event.respondWith(
caches.match(event.request)
.then(
function (response) {
if (response) {
return response;
}
return fetch(event.request);
})
);
});
{
"name": "Progressive Web Apps",
"short_name": "PWA",
"display": "standalone",
"background_color": "#ffffff",
"icons": [
{
"src": "takumi_smile.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable" // マスク可能なアイコン(透過部分が白背景にならず、アイコンですべて埋まるようにトリミングされる)
},
{
"src": "./img/512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
]
}
\ No newline at end of file
const CACHE_NAME = 'pwa-kousui-caches-v1.0.2';
const urlsToCache = [
"/",
];
self.addEventListener('install', function (event) {
event.waitUntil(
caches.open(CACHE_NAME)
.then(
function (cache) {
return cache.addAll(urlsToCache);
})
);
});
self.addEventListener('fetch', function (event) {
event.respondWith(
caches.match(event.request)
.then(
function (response) {
if (response) {
return response;
}
return fetch(event.request);
})
);
});
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<script src="js/levelMenu_ie.js"></script> <script src="js/levelMenu_ie.js"></script>
<script src="js/quizMaster.js"></script> <script src="js/quizMaster.js"></script>
<script src="js/main.js"></script> <script src="js/main.js"></script>
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" type="text/css" href="css/main_ie.css"> <link rel="stylesheet" type="text/css" href="css/main_ie.css">
<!-- preload : common --> <!-- preload : common -->
...@@ -200,6 +201,11 @@ ...@@ -200,6 +201,11 @@
</head> </head>
<body> <body>
<script>
navigator.serviceWorker.register('sw.js');
</script>
<div id="container"> <div id="container">
<div id="init_plate"> <div id="init_plate">
<!------------------------------------------------------------------------------------------ begin : init_plate --> <!------------------------------------------------------------------------------------------ begin : init_plate -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment