Skip to content

Commit

Permalink
Remove redundant JavaScript
Browse files Browse the repository at this point in the history
This is now handled on the back end.
  • Loading branch information
timacdonald committed Sep 1, 2024
1 parent aa19ed3 commit 52a3830
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions resources/js/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import './clipboard';
import './theme'

document.addEventListener('DOMContentLoaded', () => {
setupNavCurrentLinkHandling();
highlightSupportPolicyTable();

const skipToContentLink = document.querySelector('#skip-to-content-link');
Expand All @@ -19,22 +18,6 @@ document.addEventListener('DOMContentLoaded', () => {
});
})

function setupNavCurrentLinkHandling() {
[...document.querySelectorAll('.docs_sidebar h2')].forEach(el => {
el.addEventListener('click', (e) => {
e.preventDefault();

const active = el.parentNode.classList.contains('sub--on');

[...document.querySelectorAll('.docs_sidebar ul li')].forEach(el => el.classList.remove('sub--on'));

if(! active) {
el.parentNode.classList.add('sub--on');
}
});
});
}

function highlightSupportPolicyTable() {

function highlightCells(table) {
Expand Down

0 comments on commit 52a3830

Please sign in to comment.