From 7339ad6254ce3f9ed1843582927bd578ad16b42f Mon Sep 17 00:00:00 2001 From: Pavel Kvach Date: Mon, 23 Sep 2024 13:05:50 +0300 Subject: [PATCH] fix(drupal): Fix title retrieval for Drupal.org integration (#2285) Closes #928 --- src/content/drupal.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/content/drupal.js b/src/content/drupal.js index 3ac81fbd2..44be5d839 100644 --- a/src/content/drupal.js +++ b/src/content/drupal.js @@ -4,9 +4,14 @@ togglbutton.render( 'body.node-type-project-issue #tabs ul:not(.toggl)', {}, function (elem) { + const getDescription = () => { + const descriptionElem = document.getElementById('page-subtitle'); + return descriptionElem ? descriptionElem.textContent.trim() : ''; + }; + const link = togglbutton.createTimerLink({ className: 'drupalorg', - description: elem.textContent + description: getDescription }); elem.appendChild(document.createElement('li').appendChild(link));