Skip to content

Commit

Permalink
fix(airtable): Fix button not showing up (#2129)
Browse files Browse the repository at this point in the history
Closes #2123
  • Loading branch information
nunofmn authored Oct 24, 2022
1 parent 8da7de4 commit ae0fafb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/content/airtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
'use strict';

togglbutton.render(
'.DetailViewWithActivityFeed .detailView .body:not(.toggl)',
'.DetailViewWithActivityFeed:not(.toggl)',
{ observe: true },
function (elem) {
const container = $('.recordTitle > .relative', elem);
const container = elem.querySelector('div[role="button"]:nth-of-type(5)');

const getDescription = () => {
const description = $('h3.recordTitle', elem);
return description ? description.innerText : '';
const description = elem.querySelector('.detailView .cellContainer textarea')
return description ? description.value : '';
};

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

container.appendChild(link);
container.after(link);
}
);
1 change: 1 addition & 0 deletions src/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ a.toggl-button.workfront.min {

/********* AIRTABLE ********/
.toggl-button.airtable {
align-self: center;
margin-top: 5px;
margin-left: 30px;
position: relative;
Expand Down

0 comments on commit ae0fafb

Please sign in to comment.