| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 entryBox.addEventListener('focus', function() { | 156 entryBox.addEventListener('focus', function() { |
| 157 this.classList.add('contains-focus'); | 157 this.classList.add('contains-focus'); |
| 158 }, true); | 158 }, true); |
| 159 entryBox.addEventListener('blur', function() { | 159 entryBox.addEventListener('blur', function() { |
| 160 this.classList.remove('contains-focus'); | 160 this.classList.remove('contains-focus'); |
| 161 }, true); | 161 }, true); |
| 162 | 162 |
| 163 node.appendChild(entryBox); | 163 node.appendChild(entryBox); |
| 164 | 164 |
| 165 if (searchResultFlag) { | 165 if (searchResultFlag) { |
| 166 time.textContent = this.dateShort; | 166 time.appendChild(document.createTextNode(this.dateShort)); |
| 167 var snippet = createElementWithClassName('div', 'snippet'); | 167 var snippet = createElementWithClassName('div', 'snippet'); |
| 168 this.addHighlightedText_(snippet, | 168 this.addHighlightedText_(snippet, |
| 169 this.snippet_, | 169 this.snippet_, |
| 170 this.model_.getSearchText()); | 170 this.model_.getSearchText()); |
| 171 node.appendChild(snippet); | 171 node.appendChild(snippet); |
| 172 } else { | 172 } else { |
| 173 time.appendChild(document.createTextNode(this.dateTimeOfDay)); | 173 time.appendChild(document.createTextNode(this.dateTimeOfDay)); |
| 174 } | 174 } |
| 175 | 175 |
| 176 if (typeof this.domNode_ != 'undefined') { | 176 if (typeof this.domNode_ != 'undefined') { |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 historyView.reload(); | 1131 historyView.reload(); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 // Add handlers to HTML elements. | 1134 // Add handlers to HTML elements. |
| 1135 document.addEventListener('DOMContentLoaded', load); | 1135 document.addEventListener('DOMContentLoaded', load); |
| 1136 | 1136 |
| 1137 // This event lets us enable and disable menu items before the menu is shown. | 1137 // This event lets us enable and disable menu items before the menu is shown. |
| 1138 document.addEventListener('canExecute', function(e) { | 1138 document.addEventListener('canExecute', function(e) { |
| 1139 e.canExecute = true; | 1139 e.canExecute = true; |
| 1140 }); | 1140 }); |
| OLD | NEW |