From ca0b9958c08d681a7b8b8ab0e39f906dde15ff98 Mon Sep 17 00:00:00 2001 From: Thorsten von Eicken Date: Sun, 28 Jun 2015 23:48:26 -0700 Subject: [PATCH] highlight current menu entry --- html/ui.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/html/ui.js b/html/ui.js index 0257f3f..4b64c60 100644 --- a/html/ui.js +++ b/html/ui.js @@ -246,10 +246,13 @@ onLoad(function() { // populate menu via ajax call var getMenu = function() { ajaxJson("GET", "/menu", function(data) { - var html = ""; + var html = "", path = window.location.pathname; for (var i=0; i" + data.menu[i] + ""); + var href = data.menu[i+1]; + html = html.concat("
  • " + + "" + + data.menu[i] + "
  • "); } $("#menu-list").innerHTML = html;