Skip to content

Commit

Permalink
fix(clickup): Switch subtasks correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
with-shrey committed Apr 22, 2024
1 parent 8946b9e commit 5bd48f1
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/content/clickup.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
'use strict';

function getDescription() {
const description = document.querySelector('title').textContent.split('|')[0];
const taskID = document.querySelector('div[role="dialog"]').getAttribute('data-task-id');

return `${description} - #${taskID}`;
}

togglbutton.render('#timeTrackingItem:not(.toggl)', { observe: true }, function (
elem
) {

const description = document.querySelector('title').textContent.split('|')[0];
const taskID = document.querySelector('div[role="dialog"]').getAttribute('data-task-id');

const project = elem.querySelector('.space-name').textContent;
function getProject() {
const project = elem.querySelector('.space-name').textContent;
return project
}

const link = togglbutton.createTimerLink({
className: 'clickup',
description: `${description} - #${taskID}`,
projectName: project,
description: getDescription,
projectName: getProject,
buttonType: 'minimal'
});

Expand Down

0 comments on commit 5bd48f1

Please sign in to comment.