修复bug

This commit is contained in:
zqlit committed 2026-05-24 19:58:07 +08:00
1 parent e382dc36a5
commit 331af9074a
121 files changed
+323 -210

No files matched your search

+1 -1
View File
@@ -122,7 +122,7 @@ window.initArtalk = function() {
// Hook into multiple events to ensure we capture the config after it's loaded
// 'conf-loaded' is the ideal event if supported
artalk.on('conf-loaded', saveConf);
// 'mounted' is when the widget is ready
artalk.on('mounted', saveConf);
@@ -96,10 +96,7 @@ window.initFloatingTools = function() {
backToTopButton.addEventListener('click', function(e) {
e.preventDefault();
window.scrollTo({
top: 0,
behavior: 'smooth'
});
window.scrollTo({ top: 0, behavior: 'smooth' });
});
}
@@ -186,7 +183,7 @@ window.initFloatingTools = function() {
e.preventDefault();
var comments = document.getElementById('Comments') || document.querySelector('.artalk');
if (comments) {
comments.scrollIntoView({ behavior: 'smooth' });
comments.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
});
}
+3 -1
View File
@@ -48,7 +48,9 @@ window.initThemeToggle = function() {
window.dispatchEvent(new Event('resize'));
};
if (document.startViewTransition) {
var isMobile = window.isMobile && window.isMobile();
if (document.startViewTransition && !isMobile) {
document.startViewTransition(function() { apply(); });
} else {
apply();