File tree 3 files changed +44
-0
lines changed
3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @name Hubspot
3
+ * @urlAlias hubspot.com
4
+ * @urlRegex *://*.atlassian.com/*
5
+ */
6
+ 'use strict' ;
7
+
8
+ togglbutton . render (
9
+ 'div[data-selenium-test="ticket-highlight-details"]:not(.toggl)' ,
10
+ { observe : true } ,
11
+ $container => {
12
+ function descriptionSelector ( ) {
13
+ const $description = $ ( 'div[data-selenium-test="ticket-highlight-details"] h3' ) ;
14
+ return $description . textContent . trim ( ) ;
15
+ }
16
+
17
+ function tagsSelector ( ) {
18
+ const pipeline = $ ( 'div#pipeline-select' ) ? $ ( 'div#pipeline-select' ) . textContent . trim ( ) : '' ;
19
+ const stage = $ ( 'div#stage-select' ) ? $ ( 'div#stage-select' ) . textContent . trim ( ) : '' ;
20
+
21
+ return [ pipeline , stage ] ;
22
+ }
23
+ const link = togglbutton . createTimerLink ( {
24
+ className : 'hubspot' ,
25
+ project : 'Hubspot' ,
26
+ description : descriptionSelector ,
27
+ tags : tagsSelector
28
+ } ) ;
29
+ const rowContainer = document . createElement ( 'div' ) ;
30
+ rowContainer . setAttribute ( 'class' , 'flex-row align-center' ) ;
31
+ rowContainer . appendChild ( link ) ;
32
+ $container . appendChild ( rowContainer ) ;
33
+ }
34
+ ) ;
Original file line number Diff line number Diff line change @@ -260,6 +260,11 @@ export default {
260
260
url : '*://habitica.com/*' ,
261
261
name : 'Habitica'
262
262
} ,
263
+ 'hubspot.com' : {
264
+ url : '*://app.hubspot.com/*' ,
265
+ name : 'Hubspot' ,
266
+ file : 'hubspot.js'
267
+ } ,
263
268
'app.heflo.com' : {
264
269
url : '*://app.heflo.com/*' ,
265
270
name : 'HEFLO'
Original file line number Diff line number Diff line change @@ -1436,6 +1436,11 @@ body.notion-body.dark .toggl-button.notion {
1436
1436
margin-top : -7px ;
1437
1437
}
1438
1438
1439
+ /******** HUBSPOT ********/
1440
+ .toggl-button .hubspot {
1441
+ margin-top : 10px ;
1442
+ }
1443
+
1439
1444
/********* ZENHUB *********/
1440
1445
.toggl-button .zenhub {
1441
1446
padding-left : 25px ;
You can’t perform that action at this time.
0 commit comments