OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 /////////////////////////////////////////////////////////////////////////////// | 5 /////////////////////////////////////////////////////////////////////////////// |
6 // Globals: | 6 // Globals: |
7 var RESULTS_PER_PAGE = 150; | 7 var RESULTS_PER_PAGE = 150; |
8 var MAX_SEARCH_DEPTH_MONTHS = 18; | 8 var MAX_SEARCH_DEPTH_MONTHS = 18; |
9 | 9 |
10 // Amount of time between pageviews that we consider a 'break' in browsing, | 10 // Amount of time between pageviews that we consider a 'break' in browsing, |
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 * Our history system calls this function if a delete is not ready (e.g. | 1030 * Our history system calls this function if a delete is not ready (e.g. |
1031 * another delete is in-progress). | 1031 * another delete is in-progress). |
1032 */ | 1032 */ |
1033 function deleteFailed() { | 1033 function deleteFailed() { |
1034 window.console.log('Delete failed'); | 1034 window.console.log('Delete failed'); |
1035 // The deletion failed - try again later. | 1035 // The deletion failed - try again later. |
1036 deleteInFlight = false; | 1036 deleteInFlight = false; |
1037 setTimeout(deleteNextInQueue, 500); | 1037 setTimeout(deleteNextInQueue, 500); |
1038 } | 1038 } |
1039 | 1039 |
| 1040 // Add handlers to HTML elements. |
| 1041 document.body.onload = load; |
| 1042 $('history-section').onclick = function () { |
| 1043 setSearch(''); |
| 1044 return false; |
| 1045 }; |
| 1046 $('search-form').onsubmit = function () { |
| 1047 setSearch(this.term.value); |
| 1048 return false; |
| 1049 } |
| 1050 |
OLD | NEW |