@@ -58,6 +58,9 @@ class ArchiveWebApp extends ReplayWebApp {
5858
5959 archiveCookies : boolean | null = null ;
6060 archiveStorage : boolean | null = null ;
61+ archiveFlash : boolean | null = null ;
62+
63+ showIpfsShareFailed = false ;
6164
6265 constructor ( ) {
6366 super ( ) ;
@@ -106,7 +109,7 @@ class ArchiveWebApp extends ReplayWebApp {
106109 }
107110
108111 async initOpts ( ) {
109- this . autorun = ( await getLocalOption ( "autorunBehaviors" ) === "1" ) ;
112+ this . autorun = ( await getLocalOption ( "autorunBehaviors" ) ) === "1" ;
110113
111114 const archiveCookies = await getLocalOption ( "archiveCookies" ) ;
112115
@@ -118,7 +121,9 @@ class ArchiveWebApp extends ReplayWebApp {
118121 this . archiveCookies = archiveCookies === "1" ;
119122 }
120123
121- this . archiveStorage = await getLocalOption ( "archiveStorage" ) === "1" ;
124+ this . archiveStorage = ( await getLocalOption ( "archiveStorage" ) ) === "1" ;
125+
126+ this . archiveFlash = ( await getLocalOption ( "archiveFlash" ) ) === "1" ;
122127 }
123128
124129 async doBtrixLogin ( ) {
@@ -526,10 +531,7 @@ class ArchiveWebApp extends ReplayWebApp {
526531 @show-start =${ this . onShowStart }
527532 @show-import=${ this . onShowImport }
528533 @colls-updated=${ this . onCollsLoaded }
529- @ipfs-share-failed=${
530- // @ts -expect-error - TS2339 - Property 'showIpfsShareFailed' does not exist on type 'ArchiveWebApp'.
531- ( ) => ( this . showIpfsShareFailed = true )
532- }
534+ @ipfs-share-failed=${ ( ) => ( this . showIpfsShareFailed = true ) }
533535 @do-upload=${
534536 // @ts -expect-error - TS2339 - Property 'uploadCollOpts' does not exist on type 'ArchiveWebApp'.
535537 ( e ) => ( this . uploadCollOpts = e . detail )
@@ -558,10 +560,7 @@ class ArchiveWebApp extends ReplayWebApp {
558560 // @ts -expect-error - TS2339 - Property 'showSettings' does not exist on type 'ArchiveWebApp'.
559561 this . showSettings ? this . renderSettingsModal ( ) : ""
560562 }
561- ${
562- // @ts -expect-error - TS2339 - Property 'showIpfsShareFailed' does not exist on type 'ArchiveWebApp'.
563- this . showIpfsShareFailed ? this . renderIPFSShareFailedModal ( ) : ""
564- }
563+ ${ this . showIpfsShareFailed ? this . renderIPFSShareFailedModal ( ) : "" }
565564 ${
566565 // @ts -expect-error - TS2339 - Property 'uploadCollOpts' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'btrixOpts' does not exist on type 'ArchiveWebApp'.
567566 this . uploadCollOpts && this . btrixOpts ? this . renderBtrixUploadModal ( ) : ""
@@ -778,11 +777,8 @@ class ArchiveWebApp extends ReplayWebApp {
778777 }
779778
780779 renderIPFSShareFailedModal ( ) {
781- return html ` < wr-modal
782- @modal-closed ="${
783- // @ts -expect-error - TS2339 - Property 'showIpfsShareFailed' does not exist on type 'ArchiveWebApp'.
784- ( ) => ( this . showIpfsShareFailed = false )
785- } "
780+ return html `< wr-modal
781+ @modal-closed ="${ ( ) => ( this . showIpfsShareFailed = false ) } "
786782 title ="IPFS Connection Failed "
787783 >
788784 < div >
@@ -1011,7 +1007,7 @@ class ArchiveWebApp extends ReplayWebApp {
10111007 < ul >
10121008 < li class ="${ this . settingsTab === "prefs" ? "is-active" : "" } ">
10131009 < a @click =${ ( ) => ( this . settingsTab = "prefs" ) }
1014- > Archiving Privacy </ a
1010+ > Archiving Settings </ a
10151011 >
10161012 </ li >
10171013 < li
@@ -1032,9 +1028,24 @@ class ArchiveWebApp extends ReplayWebApp {
10321028 @submit ="${ this . onSaveSettings } "
10331029 >
10341030 ${ this . settingsTab === "prefs"
1035- ? html ` < fieldset >
1031+ ? html `< fieldset >
10361032 < div class ="is-size-6 ">
1037- Control archiving of sensitive browser data.
1033+ Control archiving of optional extensions and sensitive browser
1034+ data.
1035+ </ div >
1036+ < div class ="field is-size-6 mt-4 ">
1037+ < input
1038+ name ="prefArchiveFlash "
1039+ id ="archiveFlash "
1040+ class ="checkbox "
1041+ type ="checkbox "
1042+ ?checked ="${ this . archiveFlash } "
1043+ /> < span class ="ml-1 "> Enable Ruffle for Flash</ span >
1044+ < p class ="is-size-7 mt-1 ">
1045+ Enables archiving Flash content via injecting the Ruffle
1046+ emulator into the page. May cause issues with some pages,
1047+ enable only when archiving websites that contain Flash.
1048+ </ p >
10381049 </ div >
10391050 < div class ="field is-size-6 mt-4 ">
10401051 < input
@@ -1432,21 +1443,21 @@ class ArchiveWebApp extends ReplayWebApp {
14321443
14331444 const archiveCookies = this . renderRoot . querySelector ( "#archiveCookies" ) ;
14341445 const archiveStorage = this . renderRoot . querySelector ( "#archiveStorage" ) ;
1446+ const archiveFlash = this . renderRoot . querySelector ( "#archiveFlash" ) ;
14351447
14361448 if ( archiveCookies ) {
14371449 this . archiveCookies = ( archiveCookies as HTMLInputElement ) . checked ;
1438- await setLocalOption (
1439- "archiveCookies" ,
1440- this . archiveCookies ? "1" : "0" ,
1441- ) ;
1450+ await setLocalOption ( "archiveCookies" , this . archiveCookies ? "1" : "0" ) ;
14421451 }
14431452
14441453 if ( archiveStorage ) {
14451454 this . archiveStorage = ( archiveStorage as HTMLInputElement ) . checked ;
1446- await setLocalOption (
1447- "archiveStorage" ,
1448- this . archiveStorage ? "1" : "0" ,
1449- ) ;
1455+ await setLocalOption ( "archiveStorage" , this . archiveStorage ? "1" : "0" ) ;
1456+ }
1457+
1458+ if ( archiveFlash ) {
1459+ this . archiveFlash = ( archiveFlash as HTMLInputElement ) . checked ;
1460+ await setLocalOption ( "archiveFlash" , this . archiveFlash ? "1" : "0" ) ;
14501461 }
14511462
14521463 localStorage . setItem ( "settingsTab" , this . settingsTab ) ;
0 commit comments