diff --git a/src/content/youtrack.js b/src/content/youtrack.js index 320b0dc66..86725e636 100644 --- a/src/content/youtrack.js +++ b/src/content/youtrack.js @@ -56,7 +56,6 @@ togglbutton.render( { observe: true }, function (elem) { const reporterInfo = elem.querySelector('[data-test="reporter-info"]') - if (reporterInfo === null) { console.log('Toggl Button: Reporter info not found.') return @@ -64,7 +63,7 @@ togglbutton.render( const reporterInfoContainer = reporterInfo.parentElement - const issueId = $('.idLink__ee62').textContent.trim() + const issueId = reporterInfoContainer.querySelector('a[href*="issue/"]').textContent.trim() const issueTitle = $('h1').textContent.trim() const link = togglbutton.createTimerLink({