by Guest September 9th 2019, 8:12 pm
For probably nonexistent reasons, the navbar is inserted through javascript. To add a new link, you would need a code like this one:
- Code:
var name="Link to x";
var url="google.com";
;function l(e,ev,c){e.addEventListener(ev,function(f){c(f)})};
var d=document;
;function q(e){
return d.querySelector(e);
}
;l(d, "DOMContentLoaded", function(){
var m=q("#main-menu>ul");
var e=d.createElement("li");
e.innerHTML='<a href="'+url+'"><span>"'+name+'"</span></a>';
m[1].appendChild(e);
});
The first line is the text of the link and the second line is the link itself.
This whole code would have been one or 2 lines of html if the navbar was added in the templates.
Edit:Let me know if you need to add more than one link and I will edit the code for that