@@ -58,6 +58,9 @@ class ArchiveWebApp extends ReplayWebApp {
58
58
59
59
archiveCookies : boolean | null = null ;
60
60
archiveStorage : boolean | null = null ;
61
+ archiveFlash : boolean | null = null ;
62
+
63
+ showIpfsShareFailed = false ;
61
64
62
65
constructor ( ) {
63
66
super ( ) ;
@@ -106,7 +109,7 @@ class ArchiveWebApp extends ReplayWebApp {
106
109
}
107
110
108
111
async initOpts ( ) {
109
- this . autorun = ( await getLocalOption ( "autorunBehaviors" ) === "1" ) ;
112
+ this . autorun = ( await getLocalOption ( "autorunBehaviors" ) ) === "1" ;
110
113
111
114
const archiveCookies = await getLocalOption ( "archiveCookies" ) ;
112
115
@@ -118,7 +121,9 @@ class ArchiveWebApp extends ReplayWebApp {
118
121
this . archiveCookies = archiveCookies === "1" ;
119
122
}
120
123
121
- this . archiveStorage = await getLocalOption ( "archiveStorage" ) === "1" ;
124
+ this . archiveStorage = ( await getLocalOption ( "archiveStorage" ) ) === "1" ;
125
+
126
+ this . archiveFlash = ( await getLocalOption ( "archiveFlash" ) ) === "1" ;
122
127
}
123
128
124
129
async doBtrixLogin ( ) {
@@ -526,10 +531,7 @@ class ArchiveWebApp extends ReplayWebApp {
526
531
@show-start =${ this . onShowStart }
527
532
@show-import=${ this . onShowImport }
528
533
@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 ) }
533
535
@do-upload=${
534
536
// @ts -expect-error - TS2339 - Property 'uploadCollOpts' does not exist on type 'ArchiveWebApp'.
535
537
( e ) => ( this . uploadCollOpts = e . detail )
@@ -558,10 +560,7 @@ class ArchiveWebApp extends ReplayWebApp {
558
560
// @ts -expect-error - TS2339 - Property 'showSettings' does not exist on type 'ArchiveWebApp'.
559
561
this . showSettings ? this . renderSettingsModal ( ) : ""
560
562
}
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 ( ) : "" }
565
564
${
566
565
// @ts -expect-error - TS2339 - Property 'uploadCollOpts' does not exist on type 'ArchiveWebApp'. | TS2339 - Property 'btrixOpts' does not exist on type 'ArchiveWebApp'.
567
566
this . uploadCollOpts && this . btrixOpts ? this . renderBtrixUploadModal ( ) : ""
@@ -778,11 +777,8 @@ class ArchiveWebApp extends ReplayWebApp {
778
777
}
779
778
780
779
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 ) } "
786
782
title ="IPFS Connection Failed "
787
783
>
788
784
< div >
@@ -1011,7 +1007,7 @@ class ArchiveWebApp extends ReplayWebApp {
1011
1007
< ul >
1012
1008
< li class ="${ this . settingsTab === "prefs" ? "is-active" : "" } ">
1013
1009
< a @click =${ ( ) => ( this . settingsTab = "prefs" ) }
1014
- > Archiving Privacy </ a
1010
+ > Archiving Settings </ a
1015
1011
>
1016
1012
</ li >
1017
1013
< li
@@ -1032,9 +1028,24 @@ class ArchiveWebApp extends ReplayWebApp {
1032
1028
@submit ="${ this . onSaveSettings } "
1033
1029
>
1034
1030
${ this . settingsTab === "prefs"
1035
- ? html ` < fieldset >
1031
+ ? html `< fieldset >
1036
1032
< 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 >
1038
1049
</ div >
1039
1050
< div class ="field is-size-6 mt-4 ">
1040
1051
< input
@@ -1432,21 +1443,21 @@ class ArchiveWebApp extends ReplayWebApp {
1432
1443
1433
1444
const archiveCookies = this . renderRoot . querySelector ( "#archiveCookies" ) ;
1434
1445
const archiveStorage = this . renderRoot . querySelector ( "#archiveStorage" ) ;
1446
+ const archiveFlash = this . renderRoot . querySelector ( "#archiveFlash" ) ;
1435
1447
1436
1448
if ( archiveCookies ) {
1437
1449
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" ) ;
1442
1451
}
1443
1452
1444
1453
if ( archiveStorage ) {
1445
1454
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" ) ;
1450
1461
}
1451
1462
1452
1463
localStorage . setItem ( "settingsTab" , this . settingsTab ) ;
0 commit comments