INNER CODE UNIT · Python

enhanceBreadcrumbs

gurkenlabs/litiengine · config/javadoc/generate_js.py:703

  function enhanceBreadcrumbs() {
    const subNavList = document.querySelector('ol.sub-nav-list');
    if (!subNavList) return;

    const items = Array.from(subNavList.querySelectorAll('li'));
    if (!items.length) return;

    let typeChar = 'C';
    const titleEl = document.querySelector('.header .title') || document.querySelector('h1.title');
    if (titleEl) {
      const titleText = titleEl.textContent.trim();
      if (titleText.startsWith('Interface ')) typeChar = 'I';
      else if (titleText.startsWith('Enum ')) typeChar = 'E';
      else if (titleText.startsWith('Record ')) typeChar = 'R';
      else if (titleText.startsWith('Annotation ')) typeChar = '@';
    }

    const cubeSvg = `<svg class="breadcrumb-icon pkg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m7.5 4.27 9 5.15"/><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/></svg>`;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…