File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -877,7 +877,7 @@ async function renderLiveViewHTML(file) {
877877 }
878878
879879
880- 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>';
880+ 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>' ;
881881
882882
883883 const liveFrame = liveView . querySelector ( '.live-frame' ) ;
Original file line number Diff line number Diff line change @@ -187,6 +187,24 @@ window.addEventListener('online', () => { isOffline = false });
187187window . addEventListener ( 'offline' , ( ) => { isOffline = true } ) ;
188188
189189
190+ // persistent storage
191+
192+ let isPersistStorage = false ;
193+
194+ if ( navigator . storage && navigator . storage . persist ) {
195+
196+ isPersistStorage = await navigator . storage . persisted ( ) ;
197+
198+ if ( ! isPersistStorage ) {
199+
200+ // request persistent storage
201+ isPersistStorage = await navigator . storage . persist ( ) ;
202+
203+ }
204+
205+ }
206+
207+
190208// base64 encode/decode
191209
192210let encodeUnicode = ( str ) => {
You can’t perform that action at this time.
0 commit comments