A human-friendly DSL for ATProto Lexicons

Include file path when sharing

The share button didn't include the file path, hence you couldn't
correctly share the name of your Lexicon. Now you can.

+8 -4
+8 -4
website/static/js/app.js
··· 610 610 if (shareParam) { 611 611 try { 612 612 const decoded = base64urlDecode(shareParam); 613 + // Split at the first newline character 614 + const [filePath, source] = decoded.split(/\n([\s\S]*)$/); 615 + document.getElementById('file-path').value = filePath; 613 616 const textarea = document.getElementById('mlf-editor'); 614 617 if (textarea) { 615 - textarea.value = decoded; 616 - updateLineNumbers(decoded); 617 - updateHighlighting(decoded); 618 + textarea.value = source; 619 + updateLineNumbers(source); 620 + updateHighlighting(source); 618 621 } 619 622 } catch (error) { 620 623 console.error('Failed to load shared code:', error); ··· 624 627 } 625 628 626 629 function handleShare() { 630 + const filePath = document.getElementById('file-path').value; 627 631 const source = getEditorContent(); 628 - const encoded = base64urlEncode(source); 632 + const encoded = base64urlEncode(`${filePath}\n${source}`); 629 633 630 634 // Build share URL 631 635 const baseUrl = window.location.origin + window.location.pathname;