Strip node-red-contrib/node- prefix from Example menu labels

This commit is contained in:
Nick O'Leary 2016-03-03 11:02:37 +00:00
parent 55e66ebcac
commit 4b702815cf
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ RED.library = (function() {
li.className = "dropdown-submenu pull-left";
a = document.createElement("a");
a.href="#";
a.innerHTML = i;
var label = i.replace(/^node-red-contrib-/,"").replace(/^node-red-node-/,"");
a.innerHTML = label;
li.appendChild(a);
li.appendChild(buildMenu(data.d[i],root+(root!==""?"/":"")+i));
ul.appendChild(li);