Skip to content

Commit

Permalink
fix: helpscout integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
askides committed Sep 25, 2024
1 parent 8a2b141 commit a02df62
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions src/content/helpscout.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
'use strict';
'use strict'

togglbutton.render('.convo-actions:not(.toggl)', { observe: true }, function () {
const description =
'#' +
$('#tkHeader strong').textContent +
' ' +
$('#subjectLine').textContent;
togglbutton.render(
'[data-cy="ConversationHeader.Actions"]:not(.toggl)',
{ observe: true },
function () {
const id = $('[data-cy="Text"]').textContent
const content = $('[data-cy="EditableTextarea"]').textContent
const description = [id, content].join(' ')

const link = togglbutton.createTimerLink({
className: 'helpscout',
description: description,
buttonType: 'minimal'
});
const link = togglbutton.createTimerLink({
className: 'helpscout',
description: description,
buttonType: 'minimal',
})

link.setAttribute('style', 'margin-top: 10px');
link.setAttribute('style', 'margin-top: 10px')

const listItem = document.createElement('li');
listItem.appendChild(link);

$('.convo-actions').appendChild(listItem);
});
$('[data-cy="ConversationHeader.Actions"]').appendChild(link)
},
)

0 comments on commit a02df62

Please sign in to comment.