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 // This variable will be changed by iOS scripts. | 5 // This variable will be changed by iOS scripts. |
6 var distiller_on_ios = false; | 6 var distiller_on_ios = false; |
7 | 7 |
8 function addToPage(html) { | 8 function addToPage(html) { |
9 var div = document.createElement('div'); | 9 var div = document.createElement('div'); |
10 div.innerHTML = html; | 10 div.innerHTML = html; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 */ | 122 */ |
123 function showFeedbackForm(questionText, yesText, noText) { | 123 function showFeedbackForm(questionText, yesText, noText) { |
124 // If the distiller is running on iOS, do not show the feedback form. This | 124 // If the distiller is running on iOS, do not show the feedback form. This |
125 // variable is set in distiller_viewer.cc before this function is run. | 125 // variable is set in distiller_viewer.cc before this function is run. |
126 if (distiller_on_ios) return; | 126 if (distiller_on_ios) return; |
127 | 127 |
128 document.getElementById('feedbackYes').innerText = yesText; | 128 document.getElementById('feedbackYes').innerText = yesText; |
129 document.getElementById('feedbackNo').innerText = noText; | 129 document.getElementById('feedbackNo').innerText = noText; |
130 document.getElementById('feedbackQuestion').innerText = questionText; | 130 document.getElementById('feedbackQuestion').innerText = questionText; |
131 | 131 |
132 document.getElementById('contentWrap').style.paddingBottom = '120px'; | 132 document.getElementById('feedbackContainer').classList.remove("hidden"); |
csaavedra
2015/08/19 12:43:52
This won't apply, you need to rebase it.
wychen
2015/08/25 23:51:27
Done.
| |
133 document.getElementById('feedbackContainer').style.display = 'block'; | |
134 } | 133 } |
135 | 134 |
136 /** | 135 /** |
137 * Send feedback about this distilled article. | 136 * Send feedback about this distilled article. |
138 * @param good True if the feedback was positive, false if negative. | 137 * @param good True if the feedback was positive, false if negative. |
139 */ | 138 */ |
140 function sendFeedback(good) { | 139 function sendFeedback(good) { |
141 var img = document.createElement('img'); | 140 var img = document.createElement('img'); |
142 if (good) { | 141 if (good) { |
143 img.src = '/feedbackgood'; | 142 img.src = '/feedbackgood'; |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
375 shiftY: shiftY | 374 shiftY: shiftY |
376 }; | 375 }; |
377 } | 376 } |
378 }; | 377 }; |
379 }()); | 378 }()); |
380 | 379 |
381 window.addEventListener('touchstart', pincher.handleTouchStart, false); | 380 window.addEventListener('touchstart', pincher.handleTouchStart, false); |
382 window.addEventListener('touchmove', pincher.handleTouchMove, false); | 381 window.addEventListener('touchmove', pincher.handleTouchMove, false); |
383 window.addEventListener('touchend', pincher.handleTouchEnd, false); | 382 window.addEventListener('touchend', pincher.handleTouchEnd, false); |
384 window.addEventListener('touchcancel', pincher.handleTouchCancel, false); | 383 window.addEventListener('touchcancel', pincher.handleTouchCancel, false); |
OLD | NEW |