diff --git a/static/index.html b/static/index.html
index e6ec8c0..58cd7e4 100644
--- a/static/index.html
+++ b/static/index.html
@@ -269,14 +269,13 @@ Double-click any word to look it up on the right.">
-
-
+
-
Type a word and hit Go, or double-click a word in your draft. The buttons switch between its definition, rhymes, and synonyms.
+
Type a word and hit Go, or double-click a word in your draft. Its definition pins on top; the buttons switch rhymes, near rhymes, and synonyms.
@@ -528,7 +527,7 @@ editor.addEventListener('dblclick', ()=>{
if(sel){
document.getElementById('lookupInput').value = sel;
tab('lookup');
- setMode('dict');
+ doLookup();
}
});
@@ -551,7 +550,7 @@ function insertAtCursor(word){
frequency-ranked). Synonyms come from the free Datamuse API.
============================================================ */
const modeSeg = document.getElementById('modeSeg');
-let mode = 'dict';
+let mode = 'rhyme';
function setMode(m){
mode = m;
[...modeSeg.children].forEach(c=>c.classList.toggle('active', c.dataset.mode === m));
@@ -568,12 +567,7 @@ const resultsBox = document.getElementById('lookupResults');
async function doLookup(){
const word = document.getElementById('lookupInput').value.trim();
if(!word) return;
- defBox.innerHTML = '';
- if(mode === 'dict'){
- resultsBox.innerHTML = '';
- showDefinition(word);
- return;
- }
+ showDefinition(word); // the definition always pins on top
resultsBox.innerHTML = '