This commit is contained in:
BoHung Chiu 2023-01-03 16:32:10 +08:00
parent 4601c1faff
commit 8e38343f22
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,28 @@
$(document).ready(function(){
function collapse_init(){
var location_id = window.location.hash;
if(location_id && location_id != '' && location_id.length > 1){
var match_collapse = location_id.match(/\#collapse(\d+)/);
if(match_collapse){
var match_idx = parseInt(match_collapse[1]);
$('#index-archive-group .panel .collapse').removeClass('in').eq(match_idx).addClass('in');
}
}
}
collapse_init();
$('.i-archive .panel-heading, .w-archive .panel-heading').each(function(i, v){
var $v = $(v);
if($v.text().trim() == ''){
$v.css('display', 'none');
}
})
$('[data-list="archives"] a[href="javascript:void(0)"]').each(function(i, v){
var $v = $(v);
$v.before($v.text()).remove();
})
$('[data-list="archives"] a[data-target]').each(function(i, v){
var $v = $(v);
var target = $v.data('target');
$v.attr('target', target);
})
});

View File

@ -0,0 +1,3 @@
.widget-archive-files-item, .i-archive-files-item, .i-archive__file-name{
white-space: pre;
}