Skip to content

Commit 129eece

Browse files
committed
Update selector to not depend on flaky css class
1 parent 02f5614 commit 129eece

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function addToolbarButton(toolbar) {
116116
}
117117

118118
// Find the toolbar group to add our button to
119-
const isNewToolbar = toolbar.classList.contains('Toolbar-module__toolbar--CkIKP');
119+
const isNewToolbar = toolbar.getAttribute('aria-label') === 'Formatting tools';
120120
let toolbarGroup;
121121

122122
if (isNewToolbar) {
@@ -277,6 +277,7 @@ function init() {
277277

278278
// Watch for new toolbars
279279
observe(toolbarSelector, (toolbar) => {
280+
debugLog('New toolbar found:', toolbar);
280281
addToolbarButton(toolbar);
281282
});
282283
}

0 commit comments

Comments
 (0)