File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
docs/dokka-presets/scripts Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ function applySkipLinks() {
3333 document . querySelectorAll ( '.sideMenuPart[data-active]' ) . forEach ( function ( sideMenuPart ) {
3434 insertSkipLink ( sideMenuPart )
3535 } ) ;
36+
37+ // Insert a skip link on the first sideMenuPart
38+ const firstSideMenuPart = document . getElementById ( "sideMenu" ) . children [ 0 ] . querySelectorAll ( ".sideMenuPart" ) [ 0 ]
39+ insertSkipLink ( firstSideMenuPart )
3640 }
3741
3842 const observer = new MutationObserver ( handleChanges ) ;
@@ -86,9 +90,8 @@ function ensureNavButtonInteractable() {
8690 } ) ;
8791}
8892
89- window . onload = function ( ) {
90- ensureNavButtonInteractable ( )
91- }
93+ document . addEventListener ( 'DOMContentLoaded' , ensureNavButtonInteractable )
94+ if ( document . readyState === "interactive" || document . readyState === "complete" ) { ensureNavButtonInteractable ( ) }
9295
9396/**
9497 * Ensure that content (specifically, code blocks) reflows on small page sizes.
@@ -99,6 +102,8 @@ function ensureContentReflow() {
99102
100103 // Function to insert 'toggle content' button
101104 function insertToggleContentButton ( element ) {
105+ if ( element . parentNode . querySelectorAll ( ".aws-toggle-content-btn" ) . length > 0 ) { return }
106+
102107 const initiallyVisible = window . innerWidth >= MIN_WINDOW_SIZE
103108
104109 const toggleContent = document . createElement ( 'button' ) ;
You can’t perform that action at this time.
0 commit comments