: " + e);
        }
    }
}

function editElem()
{
    if(lastselectedidx >= db.length)
    {
        return;
    }
    let itm = db[lastselectedidx];
    let itmstr = JSON.stringify(itm,null,2);
    const contentsDiv = document.getElementById('contents');
    contentsDiv.innerHTML = `<button class="unselectable" onclick="return endEditElem()" style="float:right;">Save Edits</button><textarea style="line-height:1.1;width:100%;height:calc(100% - 54px);resize: none;" id="editbox" placeholder="" 