Skip to content

Commit

Permalink
Merge pull request #64 from MinhPhu0304/master
Browse files Browse the repository at this point in the history
Fix css selector to append gif toolbar button back
  • Loading branch information
N1ck authored Oct 31, 2023
2 parents a345902 + 1deb63d commit 484fa96
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ function addToolbarButton() {
// the toolbar item to any new toolbars.
observeEl(toolbar, () => {
let toolbarGroup = select.all(
'.toolbar-commenting > :not([class*="--hidden"]):not(button)',
const toolbarGroup = select('.ActionBar-item-container', toolbar)
toolbar
)
toolbarGroup = toolbarGroup[toolbarGroup.length - 1]

if (toolbarGroup) {
// Append the Giphy button to the toolbar
Expand Down Expand Up @@ -141,7 +140,7 @@ function addToolbarButton() {
* Watches for comments that might be dynamically added, then adds the button the the WYSIWYG when they are.
*/
function observeDiscussion() {
observe('md-task-list', () => addToolbarButton())
observe('markdown-toolbar', () => addToolbarButton())
}

/**
Expand Down

0 comments on commit 484fa96

Please sign in to comment.