Skip to content

Commit

Permalink
fix: helpscout integrations (#2335)
Browse files Browse the repository at this point in the history
* fix: helpscout integrations

* chore(helpscout): add header

* Update origins.js
  • Loading branch information
askides authored Sep 25, 2024
1 parent 8a2b141 commit 8feff92
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
39 changes: 22 additions & 17 deletions src/content/helpscout.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
'use strict';
/**
* @name Helpscout
* @urlAlias secure.helpscout.net
* @urlRegex *://secure.helpscout.net/*
*/

togglbutton.render('.convo-actions:not(.toggl)', { observe: true }, function () {
const description =
'#' +
$('#tkHeader strong').textContent +
' ' +
$('#subjectLine').textContent;
'use strict'

const link = togglbutton.createTimerLink({
className: 'helpscout',
description: description,
buttonType: 'minimal'
});
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(' ')

link.setAttribute('style', 'margin-top: 10px');
const link = togglbutton.createTimerLink({
className: 'helpscout',
description: description,
buttonType: 'minimal',
})

const listItem = document.createElement('li');
listItem.appendChild(link);
link.setAttribute('style', 'margin-top: 10px')

$('.convo-actions').appendChild(listItem);
});
$('[data-cy="ConversationHeader.Actions"]').appendChild(link)
},
)
3 changes: 2 additions & 1 deletion src/origins.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ export default {
},
'secure.helpscout.net': {
url: '*://secure.helpscout.net/*',
name: 'Helpscout'
name: 'Helpscout',
file: 'helpscout.js'
},
'hubspot.com': {
url: '*://app.hubspot.com/*',
Expand Down

0 comments on commit 8feff92

Please sign in to comment.