pull/1235/head
domesticmouse 5 years ago
parent 65112d01f9
commit a6201de532

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -5,8 +5,8 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"version.json": "467911f197f6e63848ac8b5043ce2585",
"main.dart.js": "04e138ac142166e85723bd6f13e52223",
"index.html": "74feb783fa76895ec478df9f24614462",
"/": "74feb783fa76895ec478df9f24614462",
"index.html": "9a6d57e94d4341f9930def1538a158de",
"/": "9a6d57e94d4341f9930def1538a158de",
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "b14fcf3ee94e3ace300b192e9e7c8c5d",
"assets/AssetManifest.json": "2efbb41d7877d10aac9d091f58ccd7b9",
"assets/NOTICES": "4f7b538f85275bf3e5c623b351af4652",

@ -24,7 +24,7 @@
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('flutter_service_worker.js?v=3133278779');
navigator.serviceWorker.register('flutter_service_worker.js?v=1247916840');
});
}
</script>

@ -4,9 +4,9 @@ const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"version.json": "2545af3387d7845af86ae1d4c38e97b4",
"main.dart.js": "1baa2d92e3bcbf61bd5d64ba5d19e205",
"index.html": "36ba77e3a112bd02b5296d75f2df6186",
"/": "36ba77e3a112bd02b5296d75f2df6186",
"main.dart.js": "1bd82a650688fba331f88e329dd4f283",
"index.html": "3d3edc0ad571d997c0dc092b524e3fa5",
"/": "3d3edc0ad571d997c0dc092b524e3fa5",
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "6d342eb68f170c97609e9da345464e5e",
"assets/AssetManifest.json": "aa929e7225d630c8eda7dc6358d13844",
"assets/NOTICES": "496dd14b3745d04bc572570976079382",

@ -1,6 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
-->
<base href="/">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
@ -12,26 +25,84 @@
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="shortcut icon" type="image/png" href="favicon.png"/>
<link rel="shortcut icon" type="image/png" href="favicon.png" />
<!-- // Other stuff -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBEKgpAdjMVMv9IKX-BBsjzwgYMxfZonbw"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzeNotARealAPIKey"></script>
<title>place_tracker</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
var serviceWorkerVersion = '167478805';
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {
return;
}
scriptLoaded = true;
var scriptTag = document.createElement('script');
scriptTag.src = 'main.dart.js';
scriptTag.type = 'application/javascript';
document.body.append(scriptTag);
}
if ('serviceWorker' in navigator) {
// Service workers are supported. Use them.
window.addEventListener('load', function () {
navigator.serviceWorker.register('flutter_service_worker.js?v=4054716506');
// Wait for registration to finish before dropping the <script> tag.
// Otherwise, the browser will load the script multiple times,
// potentially different versions.
var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion;
navigator.serviceWorker.register(serviceWorkerUrl)
.then((reg) => {
function waitForActivation(serviceWorker) {
serviceWorker.addEventListener('statechange', () => {
if (serviceWorker.state == 'activated') {
console.log('Installed new service worker.');
loadMainDartJs();
}
});
}
if (!reg.active && (reg.installing || reg.waiting)) {
// No active web worker and we have installed or are installing
// one for the first time. Simply wait for it to activate.
waitForActivation(reg.installing ?? reg.waiting);
} else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) {
// When the app updates the serviceWorkerVersion changes, so we
// need to ask the service worker to update.
console.log('New service worker available.');
reg.update();
waitForActivation(reg.installing);
} else {
// Existing service worker is still good.
console.log('Loading app from service worker.');
loadMainDartJs();
}
});
// If service worker doesn't succeed in a reasonable amount of time,
// fallback to plaint <script> tag.
setTimeout(() => {
if (!scriptLoaded) {
console.warn(
'Failed to load app from service worker. Falling back to plain <script> tag.',
);
loadMainDartJs();
}
}, 4000);
});
} else {
// Service workers not supported. Just drop the <script> tag.
loadMainDartJs();
}
</script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>
</html>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save