Skip to content

Commit

Permalink
docs: reformat script and styles for docs
Browse files Browse the repository at this point in the history
Change-Id: Ie1f52b0710f5e4878d4b5fdf06ed33a99f345ad6
  • Loading branch information
LalitMaganti committed Nov 18, 2024
1 parent db8ab06 commit 8d0abd9
Show file tree
Hide file tree
Showing 2 changed files with 884 additions and 846 deletions.
12 changes: 6 additions & 6 deletions infra/perfetto.dev/src/assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function updateTOC() {
toc.appendChild(li);
doAfterLoadEvent(() => {
tocAnchors.push(
{top: anchor.offsetTop + anchor.offsetHeight / 2, obj: link});
{ top: anchor.offsetTop + anchor.offsetHeight / 2, obj: link });
});
}
tocContainer.innerHTML = '';
Expand All @@ -81,7 +81,7 @@ function updateTOC() {
return;
tocEventHandlersInstalled = true;
const doc = document.querySelector('.doc');
const passive = {passive: true};
const passive = { passive: true };
if (doc) {
const offY = doc.offsetTop;
doc.addEventListener('mousemove', (e) => onMouseMove(offY, e), passive);
Expand All @@ -91,9 +91,9 @@ function updateTOC() {
}
window.addEventListener('scroll', () => onScroll(), passive);
resizeObserver = new ResizeObserver(() => requestAnimationFrame(() => {
updateNav();
updateTOC();
}));
updateNav();
updateTOC();
}));
resizeObserver.observe(doc);
}

Expand Down Expand Up @@ -235,7 +235,7 @@ function initMermaid() {

function setupSearch() {
const URL =
'https://www.googleapis.com/customsearch/v1?key=AIzaSyBTD2XJkQkkuvDn76LSftsgWOkdBz9Gfwo&cx=007128963598137843411:8suis14kcmy&q='
'https://www.googleapis.com/customsearch/v1?key=AIzaSyBTD2XJkQkkuvDn76LSftsgWOkdBz9Gfwo&cx=007128963598137843411:8suis14kcmy&q='
const searchContainer = document.getElementById('search');
const searchBox = document.getElementById('search-box');
const searchRes = document.getElementById('search-res')
Expand Down
Loading

0 comments on commit 8d0abd9

Please sign in to comment.