diff --git a/source/features/clean-conversation-headers.tsx b/source/features/clean-conversation-headers.tsx index 7c8a6413d45..22f4d773913 100644 --- a/source/features/clean-conversation-headers.tsx +++ b/source/features/clean-conversation-headers.tsx @@ -27,14 +27,15 @@ async function initIssue(): Promise { } async function initPR(): Promise { - const byline = await elementReady('.gh-header-meta .flex-auto:not(.rgh-clean-conversation-header)'); - if (!byline) { + const author = await elementReady('.gh-header-meta .flex-auto:not(.rgh-clean-conversation-header) .author'); + if (!author) { return; } + const byline = author.closest('.flex-auto')!; + byline.classList.add('rgh-clean-conversation-header'); - const author = select('.author', byline)!; const isSameAuthor = pageDetect.isPRConversation() && author.textContent === (await elementReady('.TimelineItem .author'))!.textContent; const [base, headBranch] = select.all('.commit-ref', byline)!;