| 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 // TODO(jhawkins): Use hidden instead of showInline* and display:none. | 5 // TODO(jhawkins): Use hidden instead of showInline* and display:none. |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Sets the display style of a node. | 8 * Sets the display style of a node. |
| 9 */ | 9 */ |
| 10 function showInline(node, isShow) { | 10 function showInline(node, isShow) { |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 $('term').focus(); | 637 $('term').focus(); |
| 638 setSearch(''); | 638 setSearch(''); |
| 639 | 639 |
| 640 var clearAllLink = $('clear-all'); | 640 var clearAllLink = $('clear-all'); |
| 641 clearAllLink.onclick = clearAll; | 641 clearAllLink.onclick = clearAll; |
| 642 clearAllLink.oncontextmenu = function() { return false; }; | 642 clearAllLink.oncontextmenu = function() { return false; }; |
| 643 | 643 |
| 644 // TODO(jhawkins): Use a link-button here. | 644 // TODO(jhawkins): Use a link-button here. |
| 645 var openDownloadsFolderLink = $('open-downloads-folder'); | 645 var openDownloadsFolderLink = $('open-downloads-folder'); |
| 646 openDownloadsFolderLink.onclick = | 646 openDownloadsFolderLink.onclick = |
| 647 chrome.send.bind(chrome, 'openDownloadsFolder'); | 647 chrome.send.bind(chrome, 'openDownloadsFolder', []); |
| 648 openDownloadsFolderLink.oncontextmenu = function() { return false; }; | 648 openDownloadsFolderLink.oncontextmenu = function() { return false; }; |
| 649 | 649 |
| 650 $('search-link').onclick = function(e) { | 650 $('search-link').onclick = function(e) { |
| 651 setSearch(''); | 651 setSearch(''); |
| 652 e.preventDefault(); | 652 e.preventDefault(); |
| 653 $('term').value = ''; | 653 $('term').value = ''; |
| 654 return false; | 654 return false; |
| 655 }; | 655 }; |
| 656 | 656 |
| 657 $('term').onsearch = function(e) { | 657 $('term').onsearch = function(e) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 if (Date.now() - start > 50) { | 714 if (Date.now() - start > 50) { |
| 715 clearTimeout(resultsTimeout); | 715 clearTimeout(resultsTimeout); |
| 716 resultsTimeout = setTimeout(tryDownloadUpdatedPeriodically, 5); | 716 resultsTimeout = setTimeout(tryDownloadUpdatedPeriodically, 5); |
| 717 break; | 717 break; |
| 718 } | 718 } |
| 719 } | 719 } |
| 720 } | 720 } |
| 721 | 721 |
| 722 // Add handlers to HTML elements. | 722 // Add handlers to HTML elements. |
| 723 window.addEventListener('DOMContentLoaded', load); | 723 window.addEventListener('DOMContentLoaded', load); |
| OLD | NEW |