From 7bfa8f260b256a7372d565eae40e113209d45a42 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 11 Mar 2023 09:40:34 -0500 Subject: [PATCH] Just select already existing tab when opening link from logger --- src/js/logger-ui.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/js/logger-ui.js b/src/js/logger-ui.js index b5f2b16c9..ef071e551 100644 --- a/src/js/logger-ui.js +++ b/src/js/logger-ui.js @@ -2070,6 +2070,23 @@ dom.on(document, 'keydown', ev => { '.canDetails > span:not(:nth-of-type(4)):not(:nth-of-type(8))', ev => { toggleOn(ev); } ); + + dom.on( + '#netInspector', + 'click', + '.logEntry > div > span:nth-of-type(8) a', + ev => { + vAPI.messaging.send('codeViewer', { + what: 'gotoURL', + details: { + url: ev.target.getAttribute('href'), + select: true, + }, + }); + ev.preventDefault(); + ev.stopPropagation(); + } + ); })(); /******************************************************************************/