OLD | NEW |
1 <h1>Settings Overrides</h1> | 1 <h1>User Interface Overrides</h1> |
2 | 2 |
3 <p> | 3 <p> |
4 Settings overrides are a way for extensions to override selected Chrome settings | 4 User interface overrides are a way for extensions to override selected Chrome |
5 and user interface properties. | 5 user interface properties. |
6 </p> | 6 </p> |
7 | 7 |
8 <h2 id="bookmarks">Bookmarks User Interface</h2> | 8 <h2 id="bookmarks">Bookmarks User Interface</h2> |
9 <p> | 9 <p> |
10 Register the settings you want to override in the | 10 Register the user interface properties you want to override in the |
11 <a href="manifest.html">extension manifest</a> like this: | 11 <a href="manifest.html">extension manifest</a> like this: |
12 </p> | 12 </p> |
13 | 13 |
14 <pre>{ | 14 <pre>{ |
15 "name": "My extension", | 15 "name": "My extension", |
16 ... | 16 ... |
17 <b> | 17 <b> |
18 "chrome_settings_overrides" : { | 18 "chrome_ui_overrides" : { |
19 "bookmarks_ui": { | 19 "bookmarks_ui": { |
20 "remove_button": "true", | 20 "remove_button": "true", |
21 "remove_bookmark_shortcut": "true" | 21 "remove_bookmark_shortcut": "true" |
22 } | 22 } |
23 }</b>, | 23 }</b>, |
24 ... | 24 ... |
25 }</pre> | 25 }</pre> |
26 | 26 |
27 <p> | 27 <p> |
28 <ul> | 28 <ul> |
(...skipping 11 matching lines...) Expand all Loading... |
40 </li> | 40 </li> |
41 </ul> | 41 </ul> |
42 </p> | 42 </p> |
43 | 43 |
44 <p class="note"> | 44 <p class="note"> |
45 <b>Note:</b> Settings overrides for <code>bookmarks_ui</code> are only enabled | 45 <b>Note:</b> Settings overrides for <code>bookmarks_ui</code> are only enabled |
46 in the Chrome Dev release, and Chrome must be started with the | 46 in the Chrome Dev release, and Chrome must be started with the |
47 <code>--enable-override-bookmarks-ui=1</code> command line flag to enable | 47 <code>--enable-override-bookmarks-ui=1</code> command line flag to enable |
48 bookmarks user interface overrides.</p> | 48 bookmarks user interface overrides.</p> |
49 | 49 |
50 <h2 id="others">Homepage, Search Provider, and Startup Pages</h2> | |
51 <p> | |
52 Here is an example how <a href="#homepage">homepage</a>, <a | |
53 href="#search_provider">search provider</a> and <a href="#startup_pages">startup | |
54 pages</a> can be modified in the <a href="manifest.html">extension | |
55 manifest</a>.</p> | |
56 | |
57 <pre>{ | |
58 "name": "My extension", | |
59 ... | |
60 "chrome_settings_overrides": { | |
61 "homepage": "http://www.homepage.com", | |
62 "search_provider": { | |
63 "name": "name.__MSG_url_domain__", | |
64 "keyword": "keyword.__MSG_url_domain__", | |
65 "search_url": "http://www.foo.__MSG_url_domain__/s?q={searchTerms}", | |
66 "favicon_url": "http://www.foo.__MSG_url_domain__/favicon.ico", | |
67 "suggest_url": "http://www.foo.__MSG_url_domain__/suggest?q={searchTerms
}", | |
68 "instant_url": "http://www.foo.__MSG_url_domain__/instant?q={searchTerms
}", | |
69 "image_url": "http://www.foo.__MSG_url_domain__/image?q={searchTerms}", | |
70 "search_url_post_params": "search_lang=__MSG_url_domain__", | |
71 "suggest_url_post_params": "suggest_lang=__MSG_url_domain__", | |
72 "instant_url_post_params": "instant_lang=__MSG_url_domain__", | |
73 "image_url_post_params": "image_lang=__MSG_url_domain__", | |
74 "alternate_urls": [ | |
75 "http://www.moo.__MSG_url_domain__/s?q={searchTerms}", | |
76 "http://www.noo.__MSG_url_domain__/s?q={searchTerms}" | |
77 ], | |
78 "encoding": "UTF-8", | |
79 "is_default": true | |
80 }, | |
81 "startup_pages": ["http://www.startup.com"] | |
82 }, | |
83 "default_locale": "de", | |
84 ... | |
85 }</pre> | |
86 | |
87 <p class="note"> | |
88 <b>Note:</b> Settings overrides for <code>homepage</code>, | |
89 <code>search_provider</code>, and <code>startup_pages</code> are only enabled | |
90 in the Chrome Dev release.</p> | |
91 | |
92 <h2 id="reference">Reference</h2> | 50 <h2 id="reference">Reference</h2> |
93 <p> | 51 <p> |
94 An extension can override one or more of the following properties in the | 52 An extension can override one or more of the following properties in the |
95 manifest: | 53 manifest: |
96 </p> | 54 </p> |
97 | 55 |
98 <ul> | 56 <ul> |
99 {{#f:apis.manifestTypes.byName.ChromeSettingsOverrides.properties}} | 57 {{#f:apis.manifestTypes.byName.ChromeUIOverrides.properties}} |
100 <li> | 58 <li> |
101 <p id="{{f.name}}"><b><code>{{f.name}}</code> ({{+partials.variable_type type:
f/}})</b></p> | 59 <p id="{{f.name}}"><b><code>{{f.name}}</code> ({{+partials.variable_type type:
f/}})</b></p> |
102 <p>{{f.description}}</p> | 60 <p>{{f.description}}</p> |
103 {{?f.properties}} | 61 {{?f.properties}} |
104 <table> | 62 <table> |
105 <tr><th>Type</th><th>Attribute</th><th>Description</th></tr> | 63 <tr><th>Type</th><th>Attribute</th><th>Description</th></tr> |
106 {{+partials.type_item | 64 {{+partials.type_item |
107 title:f.strings.properties | 65 title:f.strings.properties |
108 display_name:display_name | 66 display_name:display_name |
109 items:f.properties | 67 items:f.properties |
110 item_partial:(partials.parameter_full hideParamTOC:true)/}} | 68 item_partial:(partials.parameter_full hideParamTOC:true)/}} |
111 </table> | 69 </table> |
112 {{/}} | 70 {{/}} |
113 {{/}} | 71 {{/}} |
114 </ul> | 72 </ul> |
115 | |
OLD | NEW |