From 260a0003031b6876c5530704d19ef94ce9cf3e0d Mon Sep 17 00:00:00 2001 From: dimden <26517362+dimdenGD@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:34:59 +0300 Subject: [PATCH] fix dblclick --- manifest.json | 2 +- scripts/injection.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 3fcb509b..6c801a15 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Old Twitter Layout (2024)", "description": "__MSG_ext_description__", - "version": "1.8.7", + "version": "1.8.7.1", "manifest_version": 3, "homepage_url": "https://github.com/dimdenGD/OldTwitter", "background": { diff --git a/scripts/injection.js b/scripts/injection.js index aaead34d..bc5bf315 100644 --- a/scripts/injection.js +++ b/scripts/injection.js @@ -732,8 +732,7 @@ let page = realPath === "" ? pages[0] : pages.find(p => (!p.exclude || !p.exclud if(e.target.className !== 'viewer-canvas') return; if(Date.now() - touchStartTime < 150) { let viewerContainer = e.target.closest('.viewer-container'); - viewerContainer.querySelector('.viewer-close').click(); - console.log('close'); + setTimeout(() => viewerContainer.querySelector('.viewer-close').click(), 100); } }, { passive: false });