Skip to content

Commit

Permalink
【优化】论坛页面切换语言
Browse files Browse the repository at this point in the history
  • Loading branch information
PJ-568 committed Oct 24, 2024
1 parent 5f7c669 commit 0dd9f6e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@
progress.style.width = loadingBarWidth + "%";
}, 500);
});
//// 翻译执行完成后触发
translate.listener.renderTaskFinish = function (_task) {
if (document.getElementById("giscus-container") != null) {
SetupGiscus(getCurrentLanguage()); //// 初始化评论系统
}
}
//// 监听 Pjax 完成后加载
document.addEventListener("pjax:complete", function () {
endLoad();
Expand Down

0 comments on commit 0dd9f6e

Please sign in to comment.