revert: "docs: add linkage for `code-groups` in `getting-started`" (#1943)

Revert "docs: shared selection state in `code-groups` in `getting-started` (#1906)"

This reverts commit f1fe79b9df.
pull/1946/head
Divyansh Singh 2 years ago committed by GitHub
parent 97f2b0e129
commit ed90724022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -139,22 +139,3 @@ If you would like to know more about what you can do within the page, for exampl
If you want to know how to customize how the site looks (Theme), and find out the features VitePress's default theme provides, visit [Theme: Introduction](./theme-introduction). If you want to know how to customize how the site looks (Theme), and find out the features VitePress's default theme provides, visit [Theme: Introduction](./theme-introduction).
When your documentation site starts to take shape, be sure to read the [deployment guide](./deploying). When your documentation site starts to take shape, be sure to read the [deployment guide](./deploying).
<script setup>
import { inBrowser } from 'vitepress'
if (inBrowser) {
window.addEventListener('click', (e) => {
const el = e.target
if (el.matches('.vp-code-group input')) {
const allGroups = document.querySelectorAll('.vp-code-group')
const group = el.parentElement?.parentElement
const i = Array.from(group?.querySelectorAll('input') || []).indexOf(el)
for (let index = 0; index < allGroups.length; index++) {
if (allGroups[index] === group) continue
allGroups[index].querySelectorAll('input')[i].click()
}
}
})
}
</script>

Loading…
Cancel
Save