Change links in multi-column mode so tabs are open in single-column mode (#25893)

This commit is contained in:
Stanislas Signoud
2023-07-13 17:18:09 +02:00
committed by GitHub
parent 41f65edb21
commit 5fad7bd58a
12 changed files with 77 additions and 19 deletions

View File

@@ -94,6 +94,13 @@ const element = document.getElementById('initial-state');
/** @type {InitialState | undefined} */
const initialState = element?.textContent && JSON.parse(element.textContent);
/** @type {string} */
const initialPath = document.querySelector("head meta[name=initialPath]")?.getAttribute("content") ?? '';
/** @type {boolean} */
export const hasMultiColumnPath = initialPath === '/'
|| initialPath === '/getting-started'
|| initialPath.startsWith('/deck');
/**
* @template {keyof InitialStateMeta} K
* @param {K} prop