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

Side by Side Diff: chrome/common/extensions/docs/examples/api/fontSettings/popup.js

Issue 10532105: Use ICU script code "Jpan" instead of "Hrkt" in Japanese pref names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Mapping between font list ids and the generic family setting they 5 // Mapping between font list ids and the generic family setting they
6 // represent. 6 // represent.
7 var genericFamilies = [ 7 var genericFamilies = [
8 { fontList: 'standardFontList', name: 'standard' }, 8 { fontList: 'standardFontList', name: 'standard' },
9 { fontList: 'serifFontList', name: 'serif' }, 9 { fontList: 'serifFontList', name: 'serif' },
10 { fontList: 'sansSerifFontList', name: 'sansserif' }, 10 { fontList: 'sansSerifFontList', name: 'sansserif' },
11 { fontList: 'fixedFontList', name: 'fixed' } 11 { fontList: 'fixedFontList', name: 'fixed' }
12 ]; 12 ];
13 13
14 // Ids of elements to contain the "Lorem ipsum" sample text. 14 // Ids of elements to contain the "Lorem ipsum" sample text.
15 var sampleTextDivIds = [ 15 var sampleTextDivIds = [
16 'standardFontSample', 16 'standardFontSample',
17 'serifFontSample', 17 'serifFontSample',
18 'sansSerifFontSample', 18 'sansSerifFontSample',
19 'fixedFontSample' 19 'fixedFontSample'
20 ]; 20 ];
21 21
22 var defaultSampleText = 'Lorem ipsum dolor sit amat.'; 22 var defaultSampleText = 'Lorem ipsum dolor sit amat.';
23 var scriptSpecificSampleText = { 23 var scriptSpecificSampleText = {
24 // "Cyrllic script". 24 // "Cyrllic script".
25 'Cyrl': 'Lorem ipsum Кириллица', 25 'Cyrl': 'Кириллица',
26 'Hang': 'Lorem ipsum 雪海泳 정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날.', 26 'Hang': '정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날.',
27 'Hans': 'Lorem ipsum 雪海泳 简体字。', 27 'Hans': '床前明月光,疑是地上霜。举头望明月,低头思故乡。',
28 'Hant': 'Lorem ipsum 雪海泳 繁體字。', 28 'Hant': '床前明月光,疑是地上霜。舉頭望明月,低頭思故鄉。',
29 'Hrkt': 'Lorem ipsum 雪海泳 バスを待ち大路の春をうたがはず。', 29 'Jpan': '吾輩は猫である。名前はまだ無い。',
30 // "Khmer language". 30 // "Khmer language".
31 'Khmr': 'Lorem ipsum \u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A', 31 'Khmr': '\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A',
32 }; 32 };
33 33
34 function getSelectedScript() { 34 function getSelectedScript() {
35 var scriptList = document.getElementById('scriptList'); 35 var scriptList = document.getElementById('scriptList');
36 return scriptList.options[scriptList.selectedIndex].value; 36 return scriptList.options[scriptList.selectedIndex].value;
37 } 37 }
38 38
39 function getSelectedFont(fontList) { 39 function getSelectedFont(fontList) {
40 return fontList.options[fontList.selectedIndex].value; 40 return fontList.options[fontList.selectedIndex].value;
41 } 41 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 apiEvent.addListener(getFontSizeChangedOnBrowserFunc(elem)); 175 apiEvent.addListener(getFontSizeChangedOnBrowserFunc(elem));
176 } 176 }
177 177
178 function clearAllSettings() { 178 function clearAllSettings() {
179 var scripts = 179 var scripts =
180 ["Afak", "Arab", "Armi", "Armn", "Avst", "Bali", "Bamu", "Bass", "Batk", 180 ["Afak", "Arab", "Armi", "Armn", "Avst", "Bali", "Bamu", "Bass", "Batk",
181 "Beng", "Blis", "Bopo", "Brah", "Brai", "Bugi", "Buhd", "Cakm", "Cans", 181 "Beng", "Blis", "Bopo", "Brah", "Brai", "Bugi", "Buhd", "Cakm", "Cans",
182 "Cari", "Cham", "Cher", "Cirt", "Copt", "Cprt", "Cyrl", "Cyrs", "Deva", 182 "Cari", "Cham", "Cher", "Cirt", "Copt", "Cprt", "Cyrl", "Cyrs", "Deva",
183 "Dsrt", "Dupl", "Egyd", "Egyh", "Egyp", "Elba", "Ethi", "Geor", "Geok", 183 "Dsrt", "Dupl", "Egyd", "Egyh", "Egyp", "Elba", "Ethi", "Geor", "Geok",
184 "Glag", "Goth", "Gran", "Grek", "Gujr", "Guru", "Hang", "Hani", "Hano", 184 "Glag", "Goth", "Gran", "Grek", "Gujr", "Guru", "Hang", "Hani", "Hano",
185 "Hans", "Hant", "Hebr", "Hluw", "Hmng", "Hrkt", "Hung", "Inds", "Ital", 185 "Hans", "Hant", "Hebr", "Hluw", "Hmng", "Hung", "Inds", "Ital", "Java",
186 "Java", "Jurc", "Kali", "Khar", "Khmr", "Khoj", "Knda", "Kpel", "Kthi", 186 "Jpan", "Jurc", "Kali", "Khar", "Khmr", "Khoj", "Knda", "Kpel", "Kthi",
187 "Lana", "Laoo", "Latf", "Latg", "Latn", "Lepc", "Limb", "Lina", "Linb", 187 "Lana", "Laoo", "Latf", "Latg", "Latn", "Lepc", "Limb", "Lina", "Linb",
188 "Lisu", "Loma", "Lyci", "Lydi", "Mand", "Mani", "Maya", "Mend", "Merc", 188 "Lisu", "Loma", "Lyci", "Lydi", "Mand", "Mani", "Maya", "Mend", "Merc",
189 "Mero", "Mlym", "Moon", "Mong", "Mroo", "Mtei", "Mymr", "Narb", "Nbat", 189 "Mero", "Mlym", "Moon", "Mong", "Mroo", "Mtei", "Mymr", "Narb", "Nbat",
190 "Nkgb", "Nkoo", "Nshu", "Ogam", "Olck", "Orkh", "Orya", "Osma", "Palm", 190 "Nkgb", "Nkoo", "Nshu", "Ogam", "Olck", "Orkh", "Orya", "Osma", "Palm",
191 "Perm", "Phag", "Phli", "Phlp", "Phlv", "Phnx", "Plrd", "Prti", "Rjng", 191 "Perm", "Phag", "Phli", "Phlp", "Phlv", "Phnx", "Plrd", "Prti", "Rjng",
192 "Roro", "Runr", "Samr", "Sara", "Sarb", "Saur", "Sgnw", "Shaw", "Shrd", 192 "Roro", "Runr", "Samr", "Sara", "Sarb", "Saur", "Sgnw", "Shaw", "Shrd",
193 "Sind", "Sinh", "Sora", "Sund", "Sylo", "Syrc", "Syre", "Syrj", "Syrn", 193 "Sind", "Sinh", "Sora", "Sund", "Sylo", "Syrc", "Syre", "Syrj", "Syrn",
194 "Tagb", "Takr", "Tale", "Talu", "Taml", "Tang", "Tavt", "Telu", "Teng", 194 "Tagb", "Takr", "Tale", "Talu", "Taml", "Tang", "Tavt", "Telu", "Teng",
195 "Tfng", "Tglg", "Thaa", "Thai", "Tibt", "Tirh", "Ugar", "Vaii", "Visp", 195 "Tfng", "Tglg", "Thaa", "Thai", "Tibt", "Tirh", "Ugar", "Vaii", "Visp",
196 "Wara", "Wole", "Xpeo", "Xsux", "Yiii", "Zmth", "Zsym", "Zyyy"]; 196 "Wara", "Wole", "Xpeo", "Xsux", "Yiii", "Zmth", "Zsym", "Zyyy"];
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 initFontSizePref('minFontSize', 240 initFontSizePref('minFontSize',
241 chrome.experimental.fontSettings.getMinimumFontSize, 241 chrome.experimental.fontSettings.getMinimumFontSize,
242 chrome.experimental.fontSettings.setMinimumFontSize, 242 chrome.experimental.fontSettings.setMinimumFontSize,
243 chrome.experimental.fontSettings.onMinimumFontSizeChanged); 243 chrome.experimental.fontSettings.onMinimumFontSizeChanged);
244 244
245 var clearButton = document.getElementById('clearButton'); 245 var clearButton = document.getElementById('clearButton');
246 clearButton.addEventListener('click', clearAllSettings); 246 clearButton.addEventListener('click', clearAllSettings);
247 } 247 }
248 248
249 document.addEventListener('DOMContentLoaded', init); 249 document.addEventListener('DOMContentLoaded', init);
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/examples/api/fontSettings/popup.html ('k') | chrome/common/extensions/docs/samples.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698