Skip to content

Commit

Permalink
Freshservice Integration (#2222)
Browse files Browse the repository at this point in the history
* to be determined

* feat(freshservice): Improve styling of toggl button

---------

Co-authored-by: Shrey Gupta <connectwithshrey@gmail.com>
  • Loading branch information
EthanHunsdale and with-shrey committed Mar 5, 2024
1 parent 2df786a commit 699dbe8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/content/freshservice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';
/**
* @name FreshService
* @urlAlias freshservice.com
* @urlRegex *://*.freshservice.com/*
*/

// Main function
togglbutton.render('.tkt-quick-action:not(.toggl)', { observe: true }, function (elem) {
const titleElem = $('.summary-content .subject-text');
const idElem = $('.ticket-details-breadcrumb h3');
const id = idElem.textContent.replace('#','');
const description = id.trim() + ' ' + titleElem.textContent.trim();

const link = togglbutton.createTimerLink({
className: 'freshservice',
description: description,
projectname: '',
});

elem.prepend(link);
}
);
5 changes: 5 additions & 0 deletions src/origins.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,5 +690,10 @@ export default {
'zube.io': {
url: '*://zube.io/*',
name: 'Zube'
},
'freshservice.com': {
url: '*://*.freshservice.com/*',
name: 'Freshservice',
file: 'freshservice.js'
}
};
7 changes: 7 additions & 0 deletions src/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,13 @@ li > .toggl-button.phabricator {
left: 5px;
}


/********* FRESHSERVICE *********/
.toggl-button.freshservice {
margin-top: 5px;
margin-right: 10px;
}

/********* Clickup *********/
.toggl-button.clickup.min svg,
.toggl-button.clickup.min span {
Expand Down

0 comments on commit 699dbe8

Please sign in to comment.