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

Function pushNav

script.js:17–23  ·  view source on GitHub ↗
(noteId)

Source from the content-addressed store, hash-verified

15let navSkip = false; // true while navigating so loadNote won't push again
16
17function pushNav(noteId) {
18 if (navSkip) return;
19 if (navStack[navPos] === noteId) return; // same note, don't duplicate
20 navStack.splice(navPos + 1); // clear forward history
21 navStack.push(noteId);
22 navPos = navStack.length - 1;
23}
24
25function navigateBack() {
26 if (navPos <= 0) return;

Callers 1

loadNoteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected