From 8a5d384df6d862fbe85ebfe905093a5564fd56a0 Mon Sep 17 00:00:00 2001 From: Pavel Kvach Date: Mon, 16 Sep 2024 10:49:34 +0300 Subject: [PATCH] fix(youtrack): Fix YouTrack issue element selectors Closes #2319 --- src/content/youtrack.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/content/youtrack.js b/src/content/youtrack.js index d6bf7a477..764c578dc 100644 --- a/src/content/youtrack.js +++ b/src/content/youtrack.js @@ -49,15 +49,14 @@ togglbutton.render( 'div[data-test="issue-container"]:not(.toggl)', { observe: true }, function (elem) { - console.log('Toggl Button: Reporter info not found.') - const reporterInfo = elem.querySelector('span[data-test="reporter-info"]'); + const reporterInfo = elem.querySelector('[data-test="reporter-info"]'); if (reporterInfo === null) { console.log('Toggl Button: Reporter info not found.') return; } const reporterInfoContainer = reporterInfo.parentElement; - const issueIdElem = reporterInfoContainer.querySelector('a[href*="issue/"] > span'); + const issueIdElem = reporterInfoContainer.querySelector('a[href*="issue/"]'); const issueId = issueIdElem ? issueIdElem.textContent.trim() : ""; const issueTitleElem = elem.querySelector('h1');