File tree Expand file tree Collapse file tree 3 files changed +158
-391
lines changed Expand file tree Collapse file tree 3 files changed +158
-391
lines changed Original file line number Diff line number Diff line change @@ -770,17 +770,23 @@ async function downloadToFolder({
770
770
url,
771
771
fileName,
772
772
dirHandler,
773
- expectBlobType ,
773
+ expectBlobTypes ,
774
774
subFolderName = "" ,
775
775
} ) {
776
776
if ( ! url ) return false ;
777
777
try {
778
778
// const f = getOriginalWindowFunction("fetch");
779
779
const res = await fetch ( url ) ;
780
780
const blob = await res . blob ( ) ;
781
- if ( expectBlobType && blob . type !== expectBlobType ) {
781
+ // blobtype canbe regex
782
+ if (
783
+ expectBlobTypes ?. length &&
784
+ ! expectBlobTypes . find ( ( t ) =>
785
+ t ?. test ? t . test ( blob . type ) : t === blob . type
786
+ )
787
+ ) {
782
788
throw new Error (
783
- `Blob type ${ blob . type } doesn't match expected type ${ expectBlobType } `
789
+ `Blob type ${ blob . type } doesn't match expected type ${ expectBlobTypes } `
784
790
) ;
785
791
}
786
792
const fileHandler = await dirHandler . getFileHandle ( fileName , {
Original file line number Diff line number Diff line change 36
36
}
37
37
38
38
.ufs_popup {
39
+ position : relative;
39
40
background : # 444 ;
40
41
color : # eee ;
41
42
padding : 20px ;
110
111
.ufs_popup .clickable : hover {
111
112
background : # 666 ;
112
113
}
114
+
115
+ .ufs_popup .ufs-scroll-to-top {
116
+ position : absolute;
117
+ bottom : 10px ;
118
+ right : 10px ;
119
+ border-radius : 10px ;
120
+ cursor : pointer;
121
+ background : # 444 ;
122
+ color : white;
123
+ padding : 10px ;
124
+ }
125
+
126
+ /* check boxes */
127
+ .ufs_is_private {
128
+ position : absolute;
129
+ top : 0 ;
130
+ right : 0 ;
131
+ color : red;
132
+ background : black;
133
+ padding : 8px ;
134
+ font-weight : bold;
135
+ }
136
+
137
+ .ufs_tiktok_checkbox {
138
+ z-index : 2 ;
139
+ position : absolute;
140
+ top : 0 ;
141
+ right : 0 ;
142
+ width : 50px ;
143
+ height : 50px ;
144
+ transition : all 0.1s ease;
145
+ }
146
+
147
+ .ufs_tiktok_checkbox : hover {
148
+ transform : scale (1.3 );
149
+ }
150
+
151
+ .ufs-video-checkbox {
152
+ width : 30px ;
153
+ height : 30px ;
154
+ }
You can’t perform that action at this time.
0 commit comments