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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 $('request-access-button').classList.add('hidden-on-mobile'); | 60 $('request-access-button').classList.add('hidden-on-mobile'); |
61 }; | 61 }; |
62 $('hide-details-link').onclick = function(event) { | 62 $('hide-details-link').onclick = function(event) { |
63 $('details').hidden = true; | 63 $('details').hidden = true; |
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').innerHTML = loadTimeData.getString('feedbackLink'); |
70 $('feedback-link').onclick = function(event) { | 71 $('feedback-link').onclick = function(event) { |
71 sendCommand('feedback'); | 72 sendCommand('feedback'); |
72 }; | 73 }; |
73 } else { | |
74 $('feedback-link').style.display = 'none'; | |
75 } | 74 } |
76 } | 75 } |
77 | 76 |
78 /** | 77 /** |
79 * Updates the interstitial to show that the request failed or was sent. | 78 * Updates the interstitial to show that the request failed or was sent. |
80 * @param {boolean} isSuccessful Whether the request was successful or not. | 79 * @param {boolean} isSuccessful Whether the request was successful or not. |
81 */ | 80 */ |
82 function setRequestStatus(isSuccessful) { | 81 function setRequestStatus(isSuccessful) { |
83 $('block-page-message').hidden = true; | 82 $('block-page-message').hidden = true; |
84 if (isSuccessful) { | 83 if (isSuccessful) { |
85 $('request-failed-message').hidden = true; | 84 $('request-failed-message').hidden = true; |
86 $('request-sent-message').hidden = false; | 85 $('request-sent-message').hidden = false; |
87 $('show-details-link').hidden = true; | 86 $('show-details-link').hidden = true; |
88 $('hide-details-link').hidden = true; | 87 $('hide-details-link').hidden = true; |
89 $('details').hidden = true; | 88 $('details').hidden = true; |
90 $('back-button').hidden = false; | 89 $('back-button').hidden = false; |
91 $('request-access-button').hidden = true; | 90 $('request-access-button').hidden = true; |
92 } else { | 91 } else { |
93 $('request-failed-message').hidden = false; | 92 $('request-failed-message').hidden = false; |
94 $('request-access-button').hidden = false; | 93 $('request-access-button').hidden = false; |
95 } | 94 } |
96 } | 95 } |
97 | 96 |
98 document.addEventListener('DOMContentLoaded', initialize); | 97 document.addEventListener('DOMContentLoaded', initialize); |
OLD | NEW |