diff --git a/static/index.html b/static/index.html
index 4f1cc56..ef4ea48 100644
--- a/static/index.html
+++ b/static/index.html
@@ -290,7 +290,6 @@ Double-click any word to look it up on the right.">
-
@@ -1130,11 +1129,6 @@ lookupInput.addEventListener('paste', e=>{
/* ============================================================
FILES IN, FILES OUT — drafts shouldn't be hostage to localStorage
============================================================ */
-function draftFilename(){
- const doc = docsState.docs.find(d=>d.id===docsState.current);
- return (((doc && doc.title && doc.title !== 'Untitled') ? doc.title : 'rhymepad')
- .replace(/[^\w\- ]+/g, '').trim() || 'rhymepad') + '.txt';
-}
const shareBtn = document.getElementById('shareBtn');
if(navigator.share){
shareBtn.hidden = false;
@@ -1149,15 +1143,6 @@ if(navigator.share){
}catch(e){ /* user closed the sheet */ }
});
}
-document.getElementById('downloadBtn').addEventListener('click', ()=>{
- if(!editor.value.trim()) return;
- const a = document.createElement('a');
- a.href = URL.createObjectURL(new Blob([editor.value], {type: 'text/plain'}));
- a.download = draftFilename();
- a.click();
- setTimeout(()=>URL.revokeObjectURL(a.href), 5000);
- flash('downloadBtn', 'Saved \u2713');
-});
// drop a .txt (or any text file) anywhere -> it becomes a new draft
document.addEventListener('dragover', e=>{ e.preventDefault(); });
document.addEventListener('drop', async e=>{