|
@@ -1,7 +1,7 @@
|
|
|
<!doctype html>
|
|
<!doctype html>
|
|
|
|
|
|
|
|
<html>
|
|
<html>
|
|
|
-<markdown-html version="1.6.2" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
|
|
|
|
|
|
|
+<markdown-html version="1.6.3" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
|
|
|
license="CC BY-SA 4.0 International"></markdown-html>
|
|
license="CC BY-SA 4.0 International"></markdown-html>
|
|
|
|
|
|
|
|
<head>
|
|
<head>
|
|
@@ -479,10 +479,10 @@
|
|
|
darkmode.toggle();
|
|
darkmode.toggle();
|
|
|
} else if (event.target.closest('.translate-switch')) {
|
|
} else if (event.target.closest('.translate-switch')) {
|
|
|
translate.changeLanguage(translate.language.getLocal());
|
|
translate.changeLanguage(translate.language.getLocal());
|
|
|
- } else if (event.target.closest('.outline a[href]')) {
|
|
|
|
|
|
|
+ } else if (event.target.closest('a[href^=#]')) {
|
|
|
// 目录平滑移动
|
|
// 目录平滑移动
|
|
|
const href = event.target.getAttribute('href');
|
|
const href = event.target.getAttribute('href');
|
|
|
- if (href !== '#' && href.startsWith('#')) {
|
|
|
|
|
|
|
+ if (href !== '#') {
|
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
|
const targetElement = document.querySelector(href);
|
|
const targetElement = document.querySelector(href);
|
|
|
if (targetElement) {
|
|
if (targetElement) {
|