优化导航栏、分享海报等显示效果;优化代码及性能
This commit is contained in:
@@ -595,6 +595,9 @@ function init_douban_page() {
|
||||
requestList(1, state.type, false, {
|
||||
onSuccess: function () {
|
||||
$this.addClass('active').parent().siblings().children('.cat-link').removeClass('active');
|
||||
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
|
||||
pix.centerCategoryNavActive($this);
|
||||
}
|
||||
|
||||
var currentUrl = new URL(window.location.href);
|
||||
if (!targetTag || targetTag === '全部') {
|
||||
@@ -653,12 +656,18 @@ function init_douban_page() {
|
||||
}).first();
|
||||
if ($matchedTag.length > 0) {
|
||||
$matchedTag.addClass('active').parent().siblings().children('.cat-link').removeClass('active');
|
||||
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
|
||||
pix.centerCategoryNavActive($matchedTag);
|
||||
}
|
||||
state.type = $matchedTag.attr('data-type') || '';
|
||||
} else {
|
||||
state.type = $('.douban_cat_nav .cat-link.active').attr('data-type') || '';
|
||||
}
|
||||
} else {
|
||||
state.type = $('.douban_cat_nav .cat-link.active').attr('data-type') || '';
|
||||
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
|
||||
pix.centerCategoryNavActive($('.douban_cat_nav .cat-link.active').first());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user