1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/places/content/bookmarksPanel.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,25 @@ 1.4 +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +function init() { 1.10 + document.getElementById("bookmarks-view").place = 1.11 + "place:queryType=1&folder=" + window.top.PlacesUIUtils.allBookmarksFolderId; 1.12 +} 1.13 + 1.14 +function searchBookmarks(aSearchString) { 1.15 + var tree = document.getElementById('bookmarks-view'); 1.16 + if (!aSearchString) 1.17 + tree.place = tree.place; 1.18 + else 1.19 + tree.applyFilter(aSearchString, 1.20 + [PlacesUtils.bookmarksMenuFolderId, 1.21 + PlacesUtils.unfiledBookmarksFolderId, 1.22 + PlacesUtils.toolbarFolderId]); 1.23 +} 1.24 + 1.25 +window.addEventListener("SidebarFocused", 1.26 + function() 1.27 + document.getElementById("search-box").focus(), 1.28 + false);