From 88acf6428dac39a4c218dfcad0abcbdbe2f22cd8 Mon Sep 17 00:00:00 2001 From: ZiuChen <457353192@qq.com> Date: Tue, 16 Aug 2022 12:33:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=9B=E5=85=A5=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=87=E6=8D=A2=E5=88=B0=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E4=B8=AANav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/preload.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/preload.js b/public/preload.js index 8463ed5..2941ad2 100644 --- a/public/preload.js +++ b/public/preload.js @@ -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