fix: title translate

This commit is contained in:
Gabe Yuan
2024-01-19 21:03:51 +08:00
parent 61b017618a
commit 30efb6ee7a

View File

@@ -310,10 +310,10 @@ export class Translator {
// 翻译页面标题 // 翻译页面标题
const title = document.title; const title = document.title;
if (!title.endsWith("[ByKT]")) { if (!title.endsWith("| ByKT")) {
this._docTitle = title; this._docTitle = title;
this.translateText(title).then((trText) => { this.translateText(title).then((trText) => {
document.title = `${trText} | ${title} [ByKT]`; document.title = `${trText} | ${title} | ByKT`;
}); });
} }
}; };