This commit is contained in:
wxiaoguang
2025-10-29 20:39:19 +08:00
parent c3ecaed954
commit 309307afba
5 changed files with 8 additions and 3 deletions
+3 -1
View File
@@ -30,7 +30,9 @@ export function createViewFileTreeStore(props: {repoLink: string, treePath: stri
const response = await GET(u.href);
const elViewContent = document.querySelector('.repo-view-content');
elViewContent.innerHTML = await response.text();
document.title = elViewContent.querySelector('.repo-view-content-data').getAttribute('data-document-title');
const t1 = elViewContent.querySelector('.repo-view-content-data').getAttribute('data-document-title');
const t2 = elViewContent.querySelector('.repo-view-content-data').getAttribute('data-document-title-common');
document.title = `${t1} - ${t2}`; // follow the format in head.tmpl: <head><title>...</title></head>
},
async navigateTreeView(treePath: string) {