File tree 3 files changed +35
-0
lines changed
3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+ /**
3
+ * @name FreshService
4
+ * @urlAlias freshservice.com
5
+ * @urlRegex *://*.freshservice.com/*
6
+ */
7
+
8
+ // Main function
9
+ togglbutton . render ( '.tkt-quick-action:not(.toggl)' , { observe : true } , function ( elem ) {
10
+ const titleElem = $ ( '.summary-content .subject-text' ) ;
11
+ const idElem = $ ( '.ticket-details-breadcrumb h3' ) ;
12
+ const id = idElem . textContent . replace ( '#' , '' ) ;
13
+ const description = id . trim ( ) + ' ' + titleElem . textContent . trim ( ) ;
14
+
15
+ const link = togglbutton . createTimerLink ( {
16
+ className : 'freshservice' ,
17
+ description : description ,
18
+ projectname : '' ,
19
+ } ) ;
20
+
21
+ elem . prepend ( link ) ;
22
+ }
23
+ ) ;
Original file line number Diff line number Diff line change @@ -690,5 +690,10 @@ export default {
690
690
'zube.io' : {
691
691
url : '*://zube.io/*' ,
692
692
name : 'Zube'
693
+ } ,
694
+ 'freshservice.com' : {
695
+ url : '*://*.freshservice.com/*' ,
696
+ name : 'Freshservice' ,
697
+ file : 'freshservice.js'
693
698
}
694
699
} ;
Original file line number Diff line number Diff line change @@ -871,6 +871,13 @@ li > .toggl-button.phabricator {
871
871
left : 5px ;
872
872
}
873
873
874
+
875
+ /********* FRESHSERVICE *********/
876
+ .toggl-button .freshservice {
877
+ margin-top : 5px ;
878
+ margin-right : 10px ;
879
+ }
880
+
874
881
/********* Clickup *********/
875
882
.toggl-button .clickup .min svg ,
876
883
.toggl-button .clickup .min span {
You can’t perform that action at this time.
0 commit comments