Skip to content

Commit

Permalink
fix(drupal): Fix title retrieval for Drupal.org integration (#2285)
Browse files Browse the repository at this point in the history
Closes #928
  • Loading branch information
pkvach authored Sep 23, 2024
1 parent eb40c27 commit 7339ad6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/content/drupal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 7339ad6

Please sign in to comment.