Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: chrome/browser/resources/feedback/js/feedback.js

Issue 2826563002: Feedback: User email section should only be visible when useful (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/feedback/html/default.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * @type {string} 6 * @type {string}
7 * @const 7 * @const
8 */ 8 */
9 var SRT_DOWNLOAD_PAGE = 'https://www.google.com/chrome/cleanup-tool/'; 9 var SRT_DOWNLOAD_PAGE = 'https://www.google.com/chrome/cleanup-tool/';
10 10
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // Never add an empty option. 347 // Never add an empty option.
348 if (!email) 348 if (!email)
349 return; 349 return;
350 var optionElement = document.createElement('option'); 350 var optionElement = document.createElement('option');
351 optionElement.value = email; 351 optionElement.value = email;
352 optionElement.text = email; 352 optionElement.text = email;
353 optionElement.selected = true; 353 optionElement.selected = true;
354 // Make sure the "Report anonymously" option comes last. 354 // Make sure the "Report anonymously" option comes last.
355 $('user-email-drop-down').insertBefore(optionElement, 355 $('user-email-drop-down').insertBefore(optionElement,
356 $('anonymous-user-option')); 356 $('anonymous-user-option'));
357
358 // Now we can unhide the user email section:
359 $('user-email').hidden = false;
357 }); 360 });
358 361
359 // Initiate getting the system info. 362 // Initiate getting the system info.
360 isSystemInfoReady = false; 363 isSystemInfoReady = false;
361 getSystemInformation(onSystemInformation); 364 getSystemInformation(onSystemInformation);
362 365
363 // An extension called us with an attached file. 366 // An extension called us with an attached file.
364 if (feedbackInfo.attachedFile) { 367 if (feedbackInfo.attachedFile) {
365 $('attached-filename-text').textContent = 368 $('attached-filename-text').textContent =
366 feedbackInfo.attachedFile.name; 369 feedbackInfo.attachedFile.name;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 $('cancel-button').onclick = cancel; 450 $('cancel-button').onclick = cancel;
448 $('remove-attached-file').onclick = clearAttachedFile; 451 $('remove-attached-file').onclick = clearAttachedFile;
449 // <if expr="chromeos"> 452 // <if expr="chromeos">
450 $('performance-info-checkbox').addEventListener( 453 $('performance-info-checkbox').addEventListener(
451 'change', performanceFeedbackChanged); 454 'change', performanceFeedbackChanged);
452 // </if> 455 // </if>
453 }); 456 });
454 } 457 }
455 458
456 initialize(); 459 initialize();
OLDNEW
« no previous file with comments | « chrome/browser/resources/feedback/html/default.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698