From c265ea4b4559700343f5b446c500d421cea52a83 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Tue, 29 Mar 2022 14:47:05 +0300 Subject: [PATCH 1/3] Update live-view.js --- live-view/live-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-view/live-view.js b/live-view/live-view.js index 556b7f4ef2..0518174777 100644 --- a/live-view/live-view.js +++ b/live-view/live-view.js @@ -877,7 +877,7 @@ async function renderLiveViewHTML(file) { } - liveView.innerHTML = ''; + liveView.innerHTML = ''; const liveFrame = liveView.querySelector('.live-frame'); From 0e7bc34ab914256cd1345ade293e75a3602adec3 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Fri, 1 Apr 2022 15:47:35 +0300 Subject: [PATCH 2/3] Update utils.js --- utils.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/utils.js b/utils.js index 7ee3172b46..b3b285e429 100644 --- a/utils.js +++ b/utils.js @@ -187,6 +187,24 @@ window.addEventListener('online', () => { isOffline = false }); window.addEventListener('offline', () => { isOffline = true }); +// persistent storage + +let isPersistStorage = false; + +if (navigator.storage && navigator.storage.persist) { + + isPersistStorage = await navigator.storage.persisted(); + + if (!isPersistStorage) { + + // request persistent storage + isPersistStorage = await navigator.storage.persist(); + + } + +} + + // base64 encode/decode let encodeUnicode = (str) => { From 0bbeff1537d6ab8a93a48eac411fbc1b284df9c9 Mon Sep 17 00:00:00 2001 From: Bar Hatsor <34835685+barhatsor@users.noreply.github.com> Date: Fri, 1 Apr 2022 15:48:15 +0300 Subject: [PATCH 3/3] Update client-channel.js --- worker/client-channel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/client-channel.js b/worker/client-channel.js index 2561a2158c..4c479e9811 100644 --- a/worker/client-channel.js +++ b/worker/client-channel.js @@ -4,7 +4,7 @@ // update worker name when updating worker -const WORKER_NAME = 'codeit-worker-v491'; +const WORKER_NAME = 'codeit-worker-v492'; // internal paths