Created
May 13, 2025 14:11
-
-
Save rbk/9d261d80da598599deaf046552045f08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- Source: https://code.visualstudio.com/api/references/theme-color | |
- Retrieved: ${new Date().toString()} | |
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 = `<pre>${pageContent}</pre>`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment