Skip to content

Commit ecc7e43

Browse files
committed
feat(hubspot): Add togglbutton to hubspot ticket
1 parent d5a1b39 commit ecc7e43

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/content/hubspot.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
/**
2+
* @name Hubspot
3+
* @urlAlias hubspot.com
4+
* @urlRegex *://*.atlassian.com/*
5+
*/
16
'use strict';
2-
/* global togglbutton, $ */
37

48
togglbutton.render(
59
'div[data-selenium-test="ticket-highlight-details"]:not(.toggl)',
@@ -24,8 +28,8 @@ function descriptionSelector () {
2428
}
2529

2630
function tagsSelector () {
27-
const pipeline = $('div#pipeline-select').textContent.trim();
28-
const stage = $('div#stage-select').textContent.trim();
31+
const pipeline = $('div#pipeline-select') ? $('div#pipeline-select').textContent.trim(): '';
32+
const stage = $('div#stage-select') ? $('div#stage-select').textContent.trim(): '';
2933

3034
return [pipeline, stage];
3135
}

src/origins.js

+5
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ export default {
260260
url: '*://habitica.com/*',
261261
name: 'Habitica'
262262
},
263+
'hubspot.com': {
264+
url: '*://app.hubspot.com/*',
265+
name: 'Hubspot',
266+
file: 'hubspot.js'
267+
},
263268
'app.heflo.com': {
264269
url: '*://app.heflo.com/*',
265270
name: 'HEFLO'

0 commit comments

Comments
 (0)