// Copyright 2021 Google LLC // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd // Search the bookmarks when entering the search keyword. $('#search').change(function () { $('#bookmarks').empty(); dumpBookmarks($('#search').val()); }); // Traverse the bookmark tree, and print the folder and nodes. function dumpBookmarks(query) { chrome.bookmarks.getTree(function (bookmarkTreeNodes) { $('#bookmarks').append(dumpTreeNodes(bookmarkTreeNodes, query)); }); } function dumpTreeNodes(bookmarkNodes, query) { const list = $('