Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/common/extensions/docs/examples/api/i18n/getMessage/popup.html

Issue 9289057: Changing manifest to v2 extension samples (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding zip files after rebasing with master Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698