Skip to content

Instantly share code, notes, and snippets.

@rk185371
Created June 6, 2025 20:35
Show Gist options
  • Save rk185371/de12513abd8d19f7062a81904acbd0b7 to your computer and use it in GitHub Desktop.
Save rk185371/de12513abd8d19f7062a81904acbd0b7 to your computer and use it in GitHub Desktop.

const items = Array.from(document.querySelectorAll('main ul li')); const glossary = {} const exampleObject = {}; items.map(x => { const xx = x.textContent.split(':'); const desc = xx[1]?.trim(); const key = xx[0]?.trim(); if (!key.startsWith('The ')) { exampleObject[key] = "#ff0000"; glossary[key] = desc; } })

const pageContent = `

VS Code Color Customizations

NOTE: Key/value pairs should be nested under `workbench.colorCustomizations`

Example Object

```js const colorCustomizations = { ${Object.keys(exampleObject).map(key => { return "${key}": "${exampleObject[key]}", // ${glossary[key]} }).join('\n')} } ```

; document.body.innerHTML =

${pageContent}
`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment