| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 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 | 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> |
| 10 body { |
| 11 color: black; |
| 12 width: 300px; |
| 13 } |
| 14 </style> |
| 9 <script> | 15 <script> |
| 16 function setChildTextNode(elementId, text) { |
| 17 document.getElementById(elementId).innerText = text; |
| 18 } |
| 19 |
| 10 function init() { | 20 function init() { |
| 11 document.getElementById("languageSpan").innerHTML = | 21 setChildTextNode('languageSpan', chrome.i18n.getMessage("click_here")); |
| 12 chrome.i18n.getMessage("click_here"); | |
| 13 } | 22 } |
| 14 | 23 |
| 15 function getAcceptLanguages() { | 24 function getAcceptLanguages() { |
| 16 chrome.i18n.getAcceptLanguages(function(languageList) { | 25 chrome.i18n.getAcceptLanguages(function(languageList) { |
| 17 var languages = languageList.join(","); | 26 var languages = languageList.join(","); |
| 18 document.getElementById("languageSpan").innerHTML = | 27 setChildTextNode('languageSpan', |
| 19 chrome.i18n.getMessage("chrome_accept_languages", languages); | 28 chrome.i18n.getMessage("chrome_accept_languages", languages)); |
| 20 }) | 29 }) |
| 21 } | 30 } |
| 22 </script> | 31 </script> |
| 23 </head> | 32 </head> |
| 24 <body onload="init()"> | 33 <body onload="init()"> |
| 25 <div class="toolstrip-button" onclick="getAcceptLanguages();"> | 34 <div onclick="getAcceptLanguages();"> |
| 26 <span id="languageSpan"></span> | 35 <span id="languageSpan"></span> |
| 27 </div> | 36 </div> |
| 28 </body> | 37 </body> |
| 29 </html> | 38 </html> |
| OLD | NEW |