Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: helpscout integrations #2335

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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