mirror of
https://github.com/bcs1037/side-bookmark.git
synced 2026-07-22 06:06:38 +00:00
fix(lint): resolve remaining 4 review bot errors
This commit is contained in:
parent
3c155704db
commit
6b38578a35
2 changed files with 5 additions and 5 deletions
|
|
@ -91,7 +91,7 @@ export default class SideBookmarkPlugin extends Plugin {
|
|||
|
||||
// Find the closest anchor element from the click target
|
||||
const target = evt.target as HTMLElement;
|
||||
const anchor = target.closest('a') as HTMLAnchorElement | null;
|
||||
const anchor = target.closest('a');
|
||||
if (!anchor) return;
|
||||
|
||||
// Only handle external http/https links (skip internal Obsidian links)
|
||||
|
|
@ -131,9 +131,9 @@ export default class SideBookmarkPlugin extends Plugin {
|
|||
const firstLeaf = leaves[0];
|
||||
if (firstLeaf) {
|
||||
// Access the BookmarkView and navigate to the URL
|
||||
const view = firstLeaf.view as any;
|
||||
const view = firstLeaf.view as unknown as Record<string, unknown>;
|
||||
if (typeof view.navigateTo === 'function') {
|
||||
view.navigateTo(url);
|
||||
(view.navigateTo as (u: string) => void)(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export class SideBookmarkSettingTab extends PluginSettingTab {
|
|||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
|
||||
new Setting(containerEl).setName('Side bookmark 设置').setHeading();
|
||||
new Setting(containerEl).setName('设置').setHeading();
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('默认首页')
|
||||
|
|
@ -45,7 +45,7 @@ export class SideBookmarkSettingTab extends PluginSettingTab {
|
|||
|
||||
new Setting(containerEl)
|
||||
.setName('拦截笔记链接')
|
||||
.setDesc('开启后,单击笔记中的外部链接(http/https)将自动在 Side bookmark 内置浏览器中打开,而非使用系统浏览器。按住 Cmd/Ctrl 单击可临时绕过,仍使用系统浏览器打开。')
|
||||
.setDesc('开启后,单击笔记中的外部链接(http/https)将自动在内置浏览器中打开,而非使用系统浏览器。按住 Cmd/Ctrl 单击可临时绕过,仍使用系统浏览器打开。')
|
||||
.addToggle(toggle => toggle
|
||||
.setValue(this.plugin.store.interceptLinks)
|
||||
.onChange(async (value) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue