Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- addPopularLinkToMenu();
- //Add the popular link back only if the Hot menu link exist in the menu.
- function addPopularLinkToMenu(){
- var fav_link = document.getElementById("secondary-links-posts-hot");
- if (fav_link == null)
- {
- return;
- }
- var li = document.createElement("li"),
- a = document.createElement("a"),
- a_text = document.createTextNode("Popular"),
- parent_menu;
- li.appendChild(a);
- a.appendChild(a_text);
- a.href="/explore/posts/popular";
- parent_menu = fav_link.parentElement;
- parent_menu.insertBefore(li,fav_link.nextSibling);
- }
- })();
Add Comment
Please, Sign In to add comment