MCPcopy Create free account
hub / github.com/Alfredredbird/CyberKelp / addToRecent

Function addToRecent

script.js:52–57  ·  view source on GitHub ↗
(noteId)

Source from the content-addressed store, hash-verified

50}
51
52function 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
59function renderRecentSection() {
60 const existing = document.getElementById("recent-section");

Callers 1

loadNoteFunction · 0.85

Calls 2

getRecentIdsFunction · 0.85
renderRecentSectionFunction · 0.85

Tested by

no test coverage detected