diff options
Diffstat (limited to 'source/github-events/on-conversation-header-update.ts')
-rw-r--r-- | source/github-events/on-conversation-header-update.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/github-events/on-conversation-header-update.ts b/source/github-events/on-conversation-header-update.ts new file mode 100644 index 00000000..7c85df79 --- /dev/null +++ b/source/github-events/on-conversation-header-update.ts @@ -0,0 +1,12 @@ +import select from 'select-dom'; + +import observeElement from '../helpers/simplified-element-observer'; + +export default function onConversationHeaderUpdate(callback: VoidFunction): void { + const conversationHeader = select('#partial-discussion-header'); + if (conversationHeader) { + observeElement(conversationHeader.parentElement!, callback, { + childList: true + }); + } +} |