OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Search the bookmarks when entering the search keyword. | 5 // Search the bookmarks when entering the search keyword. |
6 $(function() { | 6 $(function() { |
7 $('#search').change(function() { | 7 $('#search').change(function() { |
8 $('#bookmarks').empty(); | 8 $('#bookmarks').empty(); |
9 dumpBookmarks($('#search').val()); | 9 dumpBookmarks($('#search').val()); |
10 }); | 10 }); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 var li = $(bookmarkNode.title ? '<li>' : '<div>').append(span); | 119 var li = $(bookmarkNode.title ? '<li>' : '<div>').append(span); |
120 if (bookmarkNode.children && bookmarkNode.children.length > 0) { | 120 if (bookmarkNode.children && bookmarkNode.children.length > 0) { |
121 li.append(dumpTreeNodes(bookmarkNode.children, query)); | 121 li.append(dumpTreeNodes(bookmarkNode.children, query)); |
122 } | 122 } |
123 return li; | 123 return li; |
124 } | 124 } |
125 | 125 |
126 document.addEventListener('DOMContentLoaded', function () { | 126 document.addEventListener('DOMContentLoaded', function () { |
127 dumpBookmarks(); | 127 dumpBookmarks(); |
128 }); | 128 }); |
OLD | NEW |