(noteId)
| 50 | } |
| 51 | |
| 52 | function addToRecent(noteId) { |
| 53 | let ids = getRecentIds(); |
| 54 | ids = [noteId, ...ids.filter(id => id !== noteId)].slice(0, MAX_RECENT); |
| 55 | try { localStorage.setItem(RECENT_KEY, JSON.stringify(ids)); } catch {} |
| 56 | renderRecentSection(); |
| 57 | } |
| 58 | |
| 59 | function renderRecentSection() { |
| 60 | const existing = document.getElementById("recent-section"); |
no test coverage detected