Skip to content
Merged

Dev #122

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion live-view/live-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ async function renderLiveViewHTML(file) {
}


liveView.innerHTML = '<iframe src="'+ livePath +'" name="' + file.name + '" title="' + file.name + '" class="live-frame" allow="accelerometer; camera; encrypted-media; display-capture; geolocation; gyroscope; microphone; midi; clipboard-read; clipboard-write" allowfullscreen="true" allowpaymentrequest="true" loading="lazy" sandbox="allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation" scrolling="yes" frameborder="0"></iframe>';
liveView.innerHTML = '<iframe src="'+ livePath +'" name="Live view" title="Live view" class="live-frame" allow="accelerometer; camera; encrypted-media; display-capture; geolocation; gyroscope; microphone; midi; clipboard-read; clipboard-write" allowfullscreen="true" allowpaymentrequest="true" loading="lazy" sandbox="allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation" scrolling="yes" frameborder="0"></iframe>';


const liveFrame = liveView.querySelector('.live-frame');
Expand Down
18 changes: 18 additions & 0 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion worker/client-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


// update worker name when updating worker
const WORKER_NAME = 'codeit-worker-v491';
const WORKER_NAME = 'codeit-worker-v492';


// internal paths
Expand Down