diff --git a/src/content/asana.js b/src/content/asana.js index 9c40ccb10..62d152d70 100644 --- a/src/content/asana.js +++ b/src/content/asana.js @@ -181,6 +181,7 @@ togglbutton.render('.TaskPane:not(.toggl)', { observe: true }, (taskPaneEl) => { projectName: projectSelector, buttonType: 'minimal', tags: tagsSelector, + autoTrackable: true, }) const injectContainer = taskPaneEl.querySelector( diff --git a/src/content/todoist.js b/src/content/todoist.js index 953e115a1..169599563 100644 --- a/src/content/todoist.js +++ b/src/content/todoist.js @@ -32,7 +32,8 @@ togglbutton.render( projectName: project, buttonType: "minimal", tags: tags, - container: '[data-testid="button-container"]' + container: '[data-testid="button-container"]', + autoTrackable: true }); const existingTogglWrapper = $('.toggl-button-todoist-wrapper'); @@ -71,7 +72,8 @@ togglbutton.render('[data-item-detail-root] [data-item-actions-root]:not(.toggl) description: description, projectName: project, tags: tags, - buttonType: 'minimal' + buttonType: 'minimal', + autoTrackable: true }); const wrapper = document.createElement('div'); diff --git a/src/content/zendesk.js b/src/content/zendesk.js index 25f91171e..859cd971d 100644 --- a/src/content/zendesk.js +++ b/src/content/zendesk.js @@ -87,7 +87,13 @@ setTimeout(() => { '.ticket-panes-grid-layout.active', { observe: true }, function (elem) { - if (elem.querySelector('.toggl-button')) return + const elements = document.querySelectorAll('.ticket-panes-grid-layout:not(.active) .toggl-button') + if(elements.length > 0) { + elements.forEach(element => element.remove()) + } + const activeButtonExists = document.querySelector('.ticket-panes-grid-layout.active .toggl-button') + if(activeButtonExists) return + let description; const projectName = $('title').textContent; @@ -108,12 +114,14 @@ setTimeout(() => { const link = togglbutton.createTimerLink({ className: 'zendesk-button', description: titleFunc, - projectName: projectName && projectName.split(' – ').shift() + projectName: projectName && projectName.split(' – ').shift(), + buttonType: 'minimal' }); elem.querySelector('[data-support-suite-trial-onboarding-id="conversationPane"] > div:nth-child(1)').lastChild.prepend(link); - } + }, + '' ); }, 1000); diff --git a/src/styles/style.css b/src/styles/style.css index 3391a7aca..25eb1fb72 100644 --- a/src/styles/style.css +++ b/src/styles/style.css @@ -357,6 +357,10 @@ a.toggl-button.toggl-plan { align-self: center; } +.toggl.button.zendesk-button { + margin-top: 5px; +} + /********* ANYDO *********/ .toggl-button.anydo { color: #099acb;