debug: 添加更多调试日志,调试控制台支持长按复制

- 在侧边栏打开事件中添加日志
- 调试控制台日志项支持长按复制(移动端)
- 复制时显示绿色高亮反馈
This commit is contained in:
2026-01-15 23:41:10 +08:00
parent ea914c14d7
commit 0547e165ab
2 changed files with 14 additions and 2 deletions

View File

@@ -2437,12 +2437,15 @@ $(document).on("click" , "#blog_categories .tag" , function(){
/*侧栏 & 顶栏菜单手机适配*/
!function(){
$(document).on("click" , "#fabtn_open_sidebar, #open_sidebar" , function(){
console.log('[Mobile Sidebar] Sidebar opened');
$("html").addClass("leftbar-opened");
// 侧边栏打开时初始化移动端文章目录
console.log('[Mobile Sidebar] Calling initMobileCatalog');
initMobileCatalog();
// 如果有文章目录,默认展开
setTimeout(function() {
var catalogSection = $("#mobile_catalog_toggle").closest(".leftbar-mobile-collapse-section");
console.log('[Mobile Sidebar] Catalog section found:', catalogSection.length);
if (catalogSection.length > 0 && !catalogSection.hasClass("expanded")) {
catalogSection.addClass("expanded");
initMobileCatalog();