This commit is contained in:
garrying
2021-03-28 23:11:58 +00:00
parent 91dd582700
commit 3ec5922875
23 changed files with 41 additions and 448 deletions

View File

@ -112,6 +112,14 @@ const setupListeners = (linkElement) => {
document.querySelectorAll('#notes-entry-container a').forEach(setupListeners)
// Random note index
if (typeof window.graphDataIndex !== 'undefined') {
const indexNodes = window.graphDataIndex.nodes
const randomNode = indexNodes[Math.floor(Math.random() * indexNodes.length)]
window.location = randomNode.path
}
// Notes graph
const d3 = window.d3