| 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 // Constants. | 5 // Constants. |
| 6 /** @const */ var FEEDBACK_LANDING_PAGE = | 6 /** @const */ var FEEDBACK_LANDING_PAGE = |
| 7 'https://www.google.com/support/chrome/go/feedback_confirmation'; | 7 'https://www.google.com/support/chrome/go/feedback_confirmation'; |
| 8 | 8 |
| 9 var selectedThumbnailDivId = ''; | 9 var selectedThumbnailDivId = ''; |
| 10 var selectedThumbnailId = ''; | 10 var selectedThumbnailId = ''; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 return; | 30 return; |
| 31 } | 31 } |
| 32 | 32 |
| 33 for (var i = 0; i < thumbnailDivs.length; i++) { | 33 for (var i = 0; i < thumbnailDivs.length; i++) { |
| 34 thumbnailDivs[i].className = 'image-thumbnail-container'; | 34 thumbnailDivs[i].className = 'image-thumbnail-container'; |
| 35 | 35 |
| 36 // If the the current div matches the thumbnail id provided, | 36 // If the the current div matches the thumbnail id provided, |
| 37 // or there is no thumbnail id given, and we're at the first thumbnail. | 37 // or there is no thumbnail id given, and we're at the first thumbnail. |
| 38 if (thumbnailDivs[i].id == thumbnailId || (!thumbnailId && !i)) { | 38 if (thumbnailDivs[i].id == thumbnailId || (!thumbnailId && !i)) { |
| 39 thumbnailDivs[i].classList.add('image-thumbnail-container-selected'); | 39 thumbnailDivs[i].classList.add('image-thumbnail-container-selected'); |
| 40 selectedThumbnailId = thumbnailId; | 40 selectedThumbnailId = thumbnailDivs[i].id; |
| 41 savedThumbnailIds[divId] = thumbnailId; | 41 savedThumbnailIds[divId] = thumbnailId; |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * Adds an image thumbnail to the specified div. | 47 * Adds an image thumbnail to the specified div. |
| 48 * @param {string} divId The id of the div to add a screenshot to. | 48 * @param {string} divId The id of the div to add a screenshot to. |
| 49 * @param {string} screenshot The URL of the screenshot being added. | 49 * @param {string} screenshot The URL of the screenshot being added. |
| 50 */ | 50 */ |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // Are screenshots disabled? | 289 // Are screenshots disabled? |
| 290 if (!defaults.disableScreenshots) | 290 if (!defaults.disableScreenshots) |
| 291 enableScreenshots(); | 291 enableScreenshots(); |
| 292 | 292 |
| 293 if (defaults.useSaved) { | 293 if (defaults.useSaved) { |
| 294 $('screenshot-link-tosaved').hidden = false; | 294 $('screenshot-link-tosaved').hidden = false; |
| 295 } | 295 } |
| 296 } | 296 } |
| 297 | 297 |
| 298 window.addEventListener('DOMContentLoaded', load); | 298 window.addEventListener('DOMContentLoaded', load); |
| OLD | NEW |