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 == '') { |
| 8 return; |
| 9 } |
| 10 chrome.send('checkPassphrase', [$('passphrase_entry').value]); |
| 11 $('passphrase_entry').value = ''; |
| 12 } |
| 13 $('cancel_passphrase_button').onclick = function(event) { |
| 14 chrome.send('DialogClose'); |
| 15 } |
| 16 } |
| 17 |
| 18 function passphraseCorrect() { |
| 19 chrome.send('DialogClose', ['correct']); |
| 20 } |
| 21 |
| 22 function passphraseIncorrect() { |
| 23 $('incorrect_passphrase_warning').style.visibility = 'visible'; |
| 24 } |
| 25 |
| 26 // Add handlers to HTML elements. |
| 27 window.addEventListener('DOMContentLoaded', load); |
OLD | NEW |