MCPcopy Create free account
hub / github.com/Yorick-Ryu/deep-share / downloadMarkdownFile

Function downloadMarkdownFile

scripts/injectGptButton.js:654–665  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

652 }
653
654 function downloadMarkdownFile(content) {
655 const filename = generateFilename(content) + '.md';
656 const blob = new Blob([content], { type: 'text/markdown;charset=utf-8' });
657 const url = URL.createObjectURL(blob);
658 const link = document.createElement('a');
659 link.href = url;
660 link.download = filename;
661 document.body.appendChild(link);
662 link.click();
663 document.body.removeChild(link);
664 URL.revokeObjectURL(url);
665 }
666
667 function generateFilename(content) {
668 return window.DeepShareUtils.generateFilename(content, {

Callers 1

injectMdButtonToMenuFunction · 0.70

Calls 4

removeChildMethod · 0.80
generateFilenameFunction · 0.70
appendChildMethod · 0.45
clickMethod · 0.45

Tested by

no test coverage detected