Skip to content

Commit

Permalink
Remove tip container too
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Feb 21, 2025
1 parent 4287e53 commit a2476f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/js/ra-doc-exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as babel from 'https://esm.sh/[email protected]/plugins/babel';
import * as estree from 'https://esm.sh/[email protected]/plugins/estree';
import { marked } from 'https://esm.sh/[email protected]';

var tipElement, allMenus, navLinks, versionsLinks;
var tipElement, tipContainer, allMenus, navLinks, versionsLinks;

const showTip = async () => {
const tips = await getContents('/assets/tips.md');
Expand Down Expand Up @@ -386,6 +386,9 @@ document.addEventListener('click', event => {
if (tipElement) {
tipElement.remove();
}
if (tipContainer) {
tipContainer.remove();
}
window.sessionStorage.setItem(
'scrollIntoView',
link.closest('.sidenav') ? 'false' : 'true'
Expand Down Expand Up @@ -432,6 +435,7 @@ window.addEventListener('popstate', () => {

window.addEventListener('DOMContentLoaded', () => {
tipElement = document.getElementById('tip');
tipContainer = document.getElementById('tip-container');
allMenus = Array.from(document.querySelectorAll(`.sidenav a.nav-link`));
navLinks = allMenus
.filter(link => !link.classList.contains('external'))
Expand Down

0 comments on commit a2476f0

Please sign in to comment.