Skip to content

Commit 7af539f

Browse files
dvhthomasclaude
andcommitted
fix: Share button was never disabled for large documents
Two places unconditionally set shareBtn.disabled = false (loadExample and init block), overriding checkShareability(). Now the button starts disabled and is only enabled by checkShareability() after a successful render proves the URL fits within 2000 chars. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c1a5c9e commit 7af539f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

static/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,6 @@
918918
var res = await fetch(EXAMPLES_BASE + name + '.cm');
919919
if (!res.ok) throw new Error();
920920
input.value = await res.text();
921-
shareBtn.disabled = false;
922921
lastRenderedSource = '';
923922
lastRawSource = '';
924923
renderCurrent();
@@ -950,7 +949,6 @@
950949
await loadFromHash();
951950
}
952951
if (input.value.trim()) {
953-
shareBtn.disabled = false;
954952
if (location.hash && location.hash.startsWith('#0:')) {
955953
cmBtn.style.display = '';
956954
}

0 commit comments

Comments
 (0)