aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/ConnectivityChecker.vue
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2023-10-21 14:24:05 +0200
committerBastien Wirtz <bastien.wirtz@gmail.com>2023-10-21 14:24:05 +0200
commitde4b7e6124254a192c897bdf0070b078a64ee563 (patch)
tree2517f4e70c56b55515f75b686fd9ea508ef5659c /src/components/ConnectivityChecker.vue
parentecf664d19b2a46c9d89a9a9c1128e22b7228607a (diff)
downloadhomer-de4b7e6124254a192c897bdf0070b078a64ee563.tar.gz
homer-de4b7e6124254a192c897bdf0070b078a64ee563.tar.zst
homer-de4b7e6124254a192c897bdf0070b078a64ee563.zip
Linting updatev23.10.1
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",