Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check ts-toggle by default #224

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/svelte.dev/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
}
}

if (localStorage.getItem('svelte:prefers-ts') !== 'false') {
if (localStorage.getItem('svelte:prefers-ts') === 'false') {
for (const node of document.querySelectorAll('.ts-toggle')) {
node.checked = true;
node.checked = false;
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion packages/site-kit/src/lib/markdown/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export async function render_content_markdown(
}

if (converted) {
html += `<input class="ts-toggle" title="Toggle language" type="checkbox" aria-label="Toggle JS/TS">`;
html += `<input class="ts-toggle" checked title="Toggle language" type="checkbox" aria-label="Toggle JS/TS">`;
}

if (options.copy) {
Expand Down
Loading