Skip to content

Commit 3a28bf4

Browse files
committed
Built web
Branch: main Commit: 9aa0b93 package:peanut 5.1.0
1 parent cad83bb commit 3a28bf4

File tree

4 files changed

+9584
-9550
lines changed

4 files changed

+9584
-9550
lines changed

flutter_bootstrap.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flutter_service_worker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ const RESOURCES = {"assets/AssetManifest.bin": "bab5a8a7ab084453c1408fb7f67e9f52
5151
"canvaskit/skwasm.worker.js": "89990e8c92bcb123999aa81f7e203b1c",
5252
"favicon.png": "d013459ae83c2741755f17e806da3e85",
5353
"flutter.js": "f393d3c16b631f36852323de8e583132",
54-
"flutter_bootstrap.js": "d47c3265c0fd95f30681e5c6c9e1c26e",
54+
"flutter_bootstrap.js": "f3eeefa87422af79ab1197f59b5d66e2",
5555
"icons/Icon-192.png": "97b1eb6da642b5c879721b4a498d52fd",
5656
"icons/Icon-512.png": "14a9d69f21be7b67853e5350b0a55b36",
5757
"icons/Icon-maskable-192.png": "97b1eb6da642b5c879721b4a498d52fd",
5858
"icons/Icon-maskable-512.png": "14a9d69f21be7b67853e5350b0a55b36",
59-
"index.html": "b26618a76845de972144bcc59384a89a",
60-
"/": "b26618a76845de972144bcc59384a89a",
61-
"main.dart.js": "e1745df382f15a5092f6245f73d5f1a9",
59+
"index.html": "89f671251a0645ae8eabc9ce36b3a45f",
60+
"/": "89f671251a0645ae8eabc9ce36b3a45f",
61+
"main.dart.js": "139db012f418d29a4834e07f92f41ca5",
6262
"manifest.json": "c9d701e059e4bb70e89999148726b0a4",
6363
"version.json": "f10c1d4b94f547b3f03bade8f040b6d4"};
6464
// The application shell files that are downloaded before a service worker can

index.html

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -46,42 +46,15 @@
4646
<img id="loading-image" src="./assets/load.gif" alt="Loading...">
4747

4848
<script>
49-
// Variable to track if the app has loaded
50-
let appLoaded = false;
51-
52-
// Check for service worker registration and hide the loading image when ready
53-
if ('serviceWorker' in navigator) {
54-
window.addEventListener('flutter-first-frame', function () {
55-
navigator.serviceWorker.register('flutter_service_worker.js?v=900432827');
56-
appLoaded = true; // Mark the app as loaded
57-
hideLoadingImage();
58-
});
59-
}
60-
61-
// Function to hide the loading image
62-
function hideLoadingImage() {
63-
if (appLoaded) {
64-
document.getElementById('loading-image').style.display = 'none';
65-
}
66-
}
67-
68-
// Ensure the loading image is displayed for at least 3 seconds
69-
const minLoadTime = 3000; // 3 seconds
70-
const startTime = Date.now();
71-
72-
const interval = setInterval(() => {
73-
// Check if the minimum load time has passed and the app has loaded
74-
if (appLoaded && (Date.now() - startTime >= minLoadTime)) {
75-
hideLoadingImage();
76-
clearInterval(interval); // Stop the interval check
49+
// Remove loading image after 10 seconds
50+
window.onload = function () {
51+
setTimeout(function () {
52+
var loadingIndicator = document.getElementById("loading-image");
53+
if (loadingIndicator) {
54+
loadingIndicator.remove();
7755
}
78-
}, 100); // Check every 100ms
79-
80-
// If the minimum load time passes, hide the loading image regardless
81-
setTimeout(() => {
82-
appLoaded = true; // Set to true to bypass any further checks
83-
hideLoadingImage(); // Hide the loading image after 3 seconds if the app hasn't loaded
84-
}, minLoadTime);
56+
}, 10000);
57+
};
8558
</script>
8659

8760
<script src="main.dart.js" type="application/javascript"></script>

0 commit comments

Comments
 (0)