michael@0: /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: function init() { michael@0: document.getElementById("bookmarks-view").place = michael@0: "place:queryType=1&folder=" + window.top.PlacesUIUtils.allBookmarksFolderId; michael@0: } michael@0: michael@0: function searchBookmarks(aSearchString) { michael@0: var tree = document.getElementById('bookmarks-view'); michael@0: if (!aSearchString) michael@0: tree.place = tree.place; michael@0: else michael@0: tree.applyFilter(aSearchString, michael@0: [PlacesUtils.bookmarksMenuFolderId, michael@0: PlacesUtils.unfiledBookmarksFolderId, michael@0: PlacesUtils.toolbarFolderId]); michael@0: } michael@0: michael@0: window.addEventListener("SidebarFocused", michael@0: function() michael@0: document.getElementById("search-box").focus(), michael@0: false);