mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-08 22:54:09 +08:00
feat: 进入插件自动切换到第一个Nav
This commit is contained in:
parent
35d0723436
commit
88acf6428d
@ -180,6 +180,8 @@ const focus = () => document.querySelector('.clip-search input')?.focus()
|
||||
|
||||
const toTop = () => (document.scrollingElement.scrollTop = 0)
|
||||
|
||||
const resetNav = () => document.querySelectorAll('.clip-switch-item')[0]?.click()
|
||||
|
||||
const db = new DB(DBPath)
|
||||
db.init()
|
||||
|
||||
@ -199,6 +201,7 @@ watchClipboard(db, (item) => {
|
||||
utools.onPluginEnter(() => {
|
||||
focus()
|
||||
toTop()
|
||||
resetNav()
|
||||
})
|
||||
|
||||
window.db = db
|
||||
|
Loading…
x
Reference in New Issue
Block a user