Skip to content

Commit

Permalink
Stop including jquery in site (#11655)
Browse files Browse the repository at this point in the history
With #8889 and
#8030 completed, we can now
remove jquery from the site. 👋

Resolves #11249
  • Loading branch information
parlough authored Feb 3, 2025
1 parent 0bf2498 commit 4b02cd9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/_layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@

</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js" integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="{{ '/assets/js/tabs.js' | append: cache_bust }}"></script>
<script src="{{ '/assets/js/archive.js' | append: cache_bust }}"></script>
<script src="{{ '/assets/js/main.js' | append: cache_bust }}"></script>
Expand Down
26 changes: 13 additions & 13 deletions src/content/assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
document.addEventListener("DOMContentLoaded", function(_) {
adjustToc();
setupInlineToc();
scrollSidenavIntoView();
initCookieNotice();

setupSidenavInteractivity();
setUpCodeBlockButtons();

setupSearch();
setupTabs();
});

function setupSidenavInteractivity() {
document.getElementById('menu-toggle')?.addEventListener('click', function (e) {
e.stopPropagation();
Expand Down Expand Up @@ -265,3 +252,16 @@ function setUpCodeBlockButtons() {
codeBlock.appendChild(buttonWrapper);
});
}

document.addEventListener("DOMContentLoaded", function(_) {
adjustToc();
setupInlineToc();
scrollSidenavIntoView();
initCookieNotice();

setupSidenavInteractivity();
setUpCodeBlockButtons();

setupSearch();
setupTabs();
});

0 comments on commit 4b02cd9

Please sign in to comment.