File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -6558,6 +6558,7 @@ var thegrid = (function () {
6558
6558
ohref = esc ( ao . getAttribute ( 'href' ) ) ,
6559
6559
href = ohref . split ( '?' ) [ 0 ] ,
6560
6560
ext = '' ,
6561
+ ext0 = '' ,
6561
6562
name = uricom_dec ( vsplit ( href ) [ 1 ] ) ,
6562
6563
ref = ao . getAttribute ( 'id' ) ,
6563
6564
isdir = href . endsWith ( '/' ) ,
@@ -6570,17 +6571,19 @@ var thegrid = (function () {
6570
6571
ar . shift ( ) ;
6571
6572
6572
6573
ar . reverse ( ) ;
6574
+ ext0 = ar [ 0 ] ;
6573
6575
for ( var b = 0 ; b < Math . min ( 2 , ar . length ) ; b ++ ) {
6574
6576
if ( ar [ b ] . length > 7 )
6575
6577
break ;
6576
6578
6577
- ext = ar [ b ] + '.' + ext ;
6579
+ ext = ext ? ( ar [ b ] + '.' + ext ) : ar [ b ] ;
6578
6580
}
6579
- ext = ( ext || 'unk.' ) . slice ( 0 , - 1 ) ;
6581
+ if ( ! ext )
6582
+ ext = 'unk' ;
6580
6583
}
6581
6584
6582
- if ( use_ext_th && ext_th [ ext ] ) {
6583
- ihref = ext_th [ ext ] ;
6585
+ if ( use_ext_th && ( ext_th [ ext ] || ext_th [ ext0 ] ) ) {
6586
+ ihref = ext_th [ ext ] || ext_th [ ext0 ] ;
6584
6587
}
6585
6588
else if ( r . thumbs ) {
6586
6589
ihref = addq ( ihref , 'th=' + ( have_webp ? 'w' : 'j' ) ) ;
You can’t perform that action at this time.
0 commit comments