assets/js/just-the-docs.js in just-the-docs-0.5.1 vs assets/js/just-the-docs.js in just-the-docs-0.5.2

- old
+ new

@@ -29,11 +29,11 @@ while (target && !(target.classList && target.classList.contains('nav-list-expander'))) { target = target.parentNode; } if (target) { e.preventDefault(); - target.parentNode.classList.toggle('active'); + target.ariaPressed = target.parentNode.classList.toggle('active'); } }); const siteNav = document.getElementById('site-nav'); const mainHeader = document.getElementById('main-header'); @@ -43,13 +43,15 @@ e.preventDefault(); if (menuButton.classList.toggle('nav-open')) { siteNav.classList.add('nav-open'); mainHeader.classList.add('nav-open'); + menuButton.ariaPressed = true; } else { siteNav.classList.remove('nav-open'); mainHeader.classList.remove('nav-open'); + menuButton.ariaPressed = false; } }); {%- if site.search_enabled != false and site.search.button %} const searchInput = document.getElementById('search-input'); @@ -489,11 +491,11 @@ jtd.onReady(function(){ if (!window.isSecureContext) { console.log('Window does not have a secure context, therefore code clipboard copy functionality will not be available. For more details see https://web.dev/async-clipboard/#security-and-permissions'); return; - } - + } + var codeBlocks = document.querySelectorAll('div.highlighter-rouge, div.listingblock > div.content, figure.highlight'); // note: the SVG svg-copied and svg-copy is only loaded as a Jekyll include if site.enable_copy_code_button is true; see _includes/icons/icons.html var svgCopied = '<svg viewBox="0 0 24 24" class="copy-icon"><use xlink:href="#svg-copied"></use></svg>'; var svgCopy = '<svg viewBox="0 0 24 24" class="copy-icon"><use xlink:href="#svg-copy"></use></svg>';