| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 function sendCommand(cmd) { | 5 function sendCommand(cmd) { |
| 6 window.domAutomationController.setAutomationId(1); | 6 window.domAutomationController.setAutomationId(1); |
| 7 window.domAutomationController.send(cmd); | 7 window.domAutomationController.send(cmd); |
| 8 } | 8 } |
| 9 | 9 |
| 10 function makeImageSet(url1x, url2x) { | 10 function makeImageSet(url1x, url2x) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 $('show-details-link').hidden = false; | 64 $('show-details-link').hidden = false; |
| 65 $('hide-details-link').hidden = true; | 65 $('hide-details-link').hidden = true; |
| 66 $('information-container').classList.remove('hidden-on-mobile'); | 66 $('information-container').classList.remove('hidden-on-mobile'); |
| 67 $('request-access-button').classList.remove('hidden-on-mobile'); | 67 $('request-access-button').classList.remove('hidden-on-mobile'); |
| 68 }; | 68 }; |
| 69 if (loadTimeData.getBoolean('showFeedbackLink')) { | 69 if (loadTimeData.getBoolean('showFeedbackLink')) { |
| 70 $('feedback-link').onclick = function(event) { | 70 $('feedback-link').onclick = function(event) { |
| 71 sendCommand('feedback'); | 71 sendCommand('feedback'); |
| 72 }; | 72 }; |
| 73 } else { | 73 } else { |
| 74 $('feedback-link').style.display = 'none'; | 74 $('feedback').hidden = true; |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 /** | 78 /** |
| 79 * Updates the interstitial to show that the request failed or was sent. | 79 * Updates the interstitial to show that the request failed or was sent. |
| 80 * @param {boolean} isSuccessful Whether the request was successful or not. | 80 * @param {boolean} isSuccessful Whether the request was successful or not. |
| 81 */ | 81 */ |
| 82 function setRequestStatus(isSuccessful) { | 82 function setRequestStatus(isSuccessful) { |
| 83 $('block-page-message').hidden = true; | 83 $('block-page-message').hidden = true; |
| 84 if (isSuccessful) { | 84 if (isSuccessful) { |
| 85 $('request-failed-message').hidden = true; | 85 $('request-failed-message').hidden = true; |
| 86 $('request-sent-message').hidden = false; | 86 $('request-sent-message').hidden = false; |
| 87 $('show-details-link').hidden = true; | 87 $('show-details-link').hidden = true; |
| 88 $('hide-details-link').hidden = true; | 88 $('hide-details-link').hidden = true; |
| 89 $('details').hidden = true; | 89 $('details').hidden = true; |
| 90 $('back-button').hidden = false; | 90 $('back-button').hidden = false; |
| 91 $('request-access-button').hidden = true; | 91 $('request-access-button').hidden = true; |
| 92 } else { | 92 } else { |
| 93 $('request-failed-message').hidden = false; | 93 $('request-failed-message').hidden = false; |
| 94 $('request-access-button').hidden = false; | 94 $('request-access-button').hidden = false; |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 | 97 |
| 98 document.addEventListener('DOMContentLoaded', initialize); | 98 document.addEventListener('DOMContentLoaded', initialize); |
| OLD | NEW |