aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/ConnectivityChecker.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ConnectivityChecker.vue')
-rw-r--r--src/components/ConnectivityChecker.vue10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue
index 5c77618..c58bfa7 100644
--- a/src/components/ConnectivityChecker.vue
+++ b/src/components/ConnectivityChecker.vue
@@ -30,21 +30,21 @@ export default {
30 that.checkOffline(); 30 that.checkOffline();
31 } 31 }
32 }, 32 },
33 false 33 false,
34 ); 34 );
35 window.addEventListener( 35 window.addEventListener(
36 "online", 36 "online",
37 function () { 37 function () {
38 that.checkOffline(); 38 that.checkOffline();
39 }, 39 },
40 false 40 false,
41 ); 41 );
42 window.addEventListener( 42 window.addEventListener(
43 "offline", 43 "offline",
44 function () { 44 function () {
45 this.offline = true; 45 this.offline = true;
46 }, 46 },
47 false 47 false,
48 ); 48 );
49 }, 49 },
50 methods: { 50 methods: {
@@ -57,7 +57,9 @@ export default {
57 // extra check to make sure we're not offline 57 // extra check to make sure we're not offline
58 let that = this; 58 let that = this;
59 const urlPath = window.location.pathname.replace(/\/+$/, ""); 59 const urlPath = window.location.pathname.replace(/\/+$/, "");
60 const aliveCheckUrl = `${window.location.origin}${urlPath}/index.html?t=${new Date().valueOf()}`; 60 const aliveCheckUrl = `${
61 window.location.origin
62 }${urlPath}/index.html?t=${new Date().valueOf()}`;
61 return fetch(aliveCheckUrl, { 63 return fetch(aliveCheckUrl, {
62 method: "HEAD", 64 method: "HEAD",
63 cache: "no-store", 65 cache: "no-store",