| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 2 Copyright (c) 2012 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 | 3 source code is governed by a BSD-style license that can be found in the |
| 4 LICENSE file. | 4 LICENSE file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 <html> | 7 <html> |
| 8 <head> | 8 <head> |
| 9 <style> | 9 <style> |
| 10 body { | 10 body { |
| 11 color: black; | 11 color: black; |
| 12 width: 300px; | 12 width: 300px; |
| 13 } | 13 } |
| 14 </style> | 14 </style> |
| 15 <script> | 15 <script src="popup.js"></script> |
| 16 function setChildTextNode(elementId, text) { | |
| 17 document.getElementById(elementId).innerText = text; | |
| 18 } | |
| 19 | |
| 20 function init() { | |
| 21 setChildTextNode('languageSpan', chrome.i18n.getMessage("click_here")); | |
| 22 } | |
| 23 | |
| 24 function getAcceptLanguages() { | |
| 25 chrome.i18n.getAcceptLanguages(function(languageList) { | |
| 26 var languages = languageList.join(","); | |
| 27 setChildTextNode('languageSpan', | |
| 28 chrome.i18n.getMessage("chrome_accept_languages", languages)); | |
| 29 }) | |
| 30 } | |
| 31 </script> | |
| 32 </head> | 16 </head> |
| 33 <body onload="init()"> | 17 <body> |
| 34 <div onclick="getAcceptLanguages();"> | 18 <div id="accept_lang"> |
| 35 <span id="languageSpan"></span> | 19 <span id="languageSpan"></span> |
| 36 </div> | 20 </div> |
| 37 </body> | 21 </body> |
| 38 </html> | 22 </html> |
| OLD | NEW |