var bmk = chrome.bookmarks; // Chrome bookmarks shorthand

document.addEventListener("DOMContentLoaded", function(event) { 
    displayBookmarks();
});

function displayBookmarks() {
    // "1" being the Bookmarks Bar, grab the bookmark tree.
    bmk.getSubTree("1", function(e) {

        var bookmarkBar = document.getElementById("bookmarksbar");

        // Iterate through the bookmark nodes.
        e[0].children.forEach(function(bookmark) {
            // TODO - Support folders. For now, skip them.
            if (bookmark.children !== undefined)
                return;
            
            var bookmarkEntry = document.createElement("LI"); // Container
            var bookmarkLink = document.createElement("A");   // Hyperlink
            var bookmarkIcon = document.createElement("IMG"); // Favicon
            
            bookmarkLink.setAttribute("href", bookmark.url);
            bookmarkIcon.setAttribute("src", "chrome://favicon/" + bookmark.url);
            bookmarkIcon.setAttribute("class", "favicon");
            bookmarkIcon.setAttribute("title", bookmark.title);
            
            bookmarkLink.appendChild(bookmarkIcon);
            bookmarkEntry.appendChild(bookmarkLink);
            bookmarkBar.appendChild(bookmarkEntry);
        });
    }); 
}
@@ -1024,16 +1024,161 @@
 icon%22);%0A
+            %0A            if (bookmark.url === %22chrome://apps/%22) %7B%0A                bookmarkIcon.setAttribute(%22id%22, %22applauncher%22);%0A            %7D%0A%0A
         
@@ -1414,16 +1414,282 @@
      %7D);
+%0A%0A        // Enable launching of the App tray, which is otherwise blocked.%0A        document.getElementById(%22applauncher%22).addEventListener(%22click%22, function() %7B %0A            event.preventDefault();%0A            chrome.tabs.update(%7Burl: %22chrome://apps/%22%7D);%0A        %7D);
 %0A    %7D);

Enable launching app tray from bookmarks.