only target toc topics

This commit is contained in:
Joe 2019-03-09 14:04:05 +08:00 committed by GitHub
parent dacb213a36
commit cd21d0bdfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ api.modifyClass("component:topic-timeline", {
} }
}); });
api.onAppEvent("topic:current-post-changed", post => { api.onAppEvent("topic:current-post-changed", post => {
if (!$(".d-toc-timeline").length) return; if (!$(".d-toc-regular").length) return;
if (post.post.post_number === 1) { if (post.post.post_number === 1) {
$(".d-toc-timeline").hide(); $(".d-toc-timeline").hide();
$(".d-toc-toggle").fadeIn(); $(".d-toc-toggle").fadeIn();