Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 function load() { | |
| 6 $('unlock_passphrase_button').onclick = function(event) { | |
| 7 if ($('passphrase_entry').value == '') { | |
|
Bernhard Bauer
2013/01/07 14:20:22
Braces around one-line statements are unnecessary.
Pam (message me for reviews)
2013/01/07 14:51:49
Should we support an empty password, if I decide n
| |
| 8 return; | |
|
Bernhard Bauer
2013/01/07 14:20:22
Hm, does that mean that we don't allow empty passw
| |
| 9 } | |
| 10 chrome.send('checkPassphrase', [$('passphrase_entry').value]); | |
| 11 $('passphrase_entry').value = ''; | |
|
Pam (message me for reviews)
2013/01/07 14:51:49
Is this necessary? I always find it a little odd-l
| |
| 12 } | |
|
Bernhard Bauer
2013/01/07 14:20:22
Needs a semicolon.
| |
| 13 $('cancel_passphrase_button').onclick = function(event) { | |
| 14 chrome.send('DialogClose'); | |
| 15 } | |
|
Bernhard Bauer
2013/01/07 14:20:22
Semicolon.
| |
| 16 } | |
| 17 | |
| 18 function passphraseCorrect() { | |
| 19 chrome.send('DialogClose', ['correct']); | |
|
Bernhard Bauer
2013/01/07 14:20:22
Do you need to pass a string constant? Could you p
| |
| 20 } | |
| 21 | |
| 22 function passphraseIncorrect() { | |
| 23 $('incorrect_passphrase_warning').style.visibility = 'visible'; | |
|
Bernhard Bauer
2013/01/07 14:20:22
Modifying style attributes directly kinda violates
| |
| 24 } | |
| 25 | |
| 26 // Add handlers to HTML elements. | |
|
Bernhard Bauer
2013/01/07 14:20:22
This comment isn't really necessary :-D
| |
| 27 window.addEventListener('DOMContentLoaded', load); | |
| OLD | NEW |