diff --git a/src/content/wrike.js b/src/content/wrike.js index a7bd2174f..19f102d3d 100644 --- a/src/content/wrike.js +++ b/src/content/wrike.js @@ -4,8 +4,7 @@ * @urlRegex *://*.wrike.com/* */ -'use strict'; - +'use strict' togglbutton.render( 'work-item-title:not(.toggl)', @@ -15,32 +14,32 @@ togglbutton.render( const viewContainer = document.querySelector('entity-view') const getTitleElement = function () { - const wsTaskTitle = elem.querySelectorAll('task-title'); + const wsTaskTitle = elem.querySelectorAll('task-title') if (wsTaskTitle.length === 1 && wsTaskTitle[0].textContent !== '') { - return wsTaskTitle[0]; + return wsTaskTitle[0] } - return $('title'); - }; + return $('title') + } const descriptionText = function () { - const titleElem = getTitleElement(); - const titleElemText = titleElem ? titleElem.textContent : 'not found'; - - return `${titleElemText.trim().replace(' - Wrike', '')}`.trim(); - }; + const titleElem = getTitleElement() + const titleElemText = titleElem ? titleElem.textContent : 'not found' + + return `${titleElemText.trim().replace(' - Wrike', '')}`.trim() + } const projectText = function () { - const projectElem = viewContainer.querySelector('wrike-tag'); + const projectElem = viewContainer.querySelector('wrike-tag') // We process the project element text content. - return projectElem ? projectElem.textContent : ''; - }; + return projectElem ? projectElem.textContent : '' + } const link = togglbutton.createTimerLink({ className: 'wrike', description: descriptionText, - projectName: projectText - }); + projectName: projectText, + }) - container.prepend(link); - } -); + container.prepend(link) + }, +)