Skip to content

Commit

Permalink
Update toc active item selectors (#152)
Browse files Browse the repository at this point in the history
869854 changes these selectors to use the `toc-` prefix so updating here as
well.
  • Loading branch information
Nicholas Ray authored Jan 5, 2023
1 parent 772d80c commit 357e4f2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/engine-scripts/puppet/onReady.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,17 @@ module.exports = async ( page, scenario ) => {
await fastForwardAnimations( page );

/**
* Remove the .sidebar-toc-list-item-active class from the item in the toc
* What is focused is variable, so can lead to false positives in pixel.
* Knowing it exists is enough to know it is working.
* Remove the .sidebar-toc-list-item-active, .vector-toc-list-item-active
* class from the item in the toc What is focused is variable, so can lead to
* false positives in pixel. Knowing it exists is enough to know it is
* working.
*/
await page.evaluate( () => {
document.querySelectorAll(
'.sidebar-toc-list-item-active'
'.sidebar-toc-list-item-active, .vector-toc-list-item-active'
).forEach( ( node ) => {
node.classList.remove(
'sidebar-toc-list-item-active', 'sidebar-toc-level-1-active'
'sidebar-toc-list-item-active', 'vector-toc-list-item-active'
);
} );
return true;
Expand Down

0 comments on commit 357e4f2

Please sign in to comment.