OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 3 source code is governed by a BSD-style license that can be found in the |
| 4 LICENSE file. |
| 5 --> |
| 6 |
| 7 <html> |
| 8 <head> |
| 9 <script> |
| 10 function getAcceptLanguages() { |
| 11 chrome.i18n.getAcceptLanguages(function(languageList) { |
| 12 var languages = ""; |
| 13 for (var i = 0; i < languageList.length; i++) { |
| 14 if (i == languageList.length - 1) |
| 15 languages += languageList[i]; |
| 16 else |
| 17 languages += languageList[i] + ","; |
| 18 } |
| 19 document.getElementById("languageSpan").innerHTML = languages; |
| 20 }) |
| 21 } |
| 22 </script> |
| 23 </head> |
| 24 <body> |
| 25 <div class="toolstrip-button" onclick="getAcceptLanguages();"> |
| 26 <span id="languageSpan">GetAcceptLanguage</span> |
| 27 </div> |
| 28 </body> |
| 29 </html> |
OLD | NEW |