| 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> |
| 29 <li> | 29 <li> |
| 30 <a href="#bookmarks_ui">Bookmark button</a>: the "star" button that is used | 30 <a href="#bookmarks_ui">Bookmark button</a>: the "star" button that is used |
| 31 to bookmark pages. Extensions may remove this button using the settings | 31 to bookmark pages. Extensions may remove this button using the settings |
| 32 overrides, and optionally replace it with a browser action or page action. | 32 overrides, and optionally replace it with a browser action or page action. |
| 33 </li> | 33 </li> |
| 34 | 34 |
| 35 <li> | 35 <li> |
| 36 <a href="#bookmarks_ui">Bookmark shortcut</a>: the shortcut key that is | 36 <a href="#bookmarks_ui">Bookmark shortcut</a>: the shortcut key that is used |
| 37 used to bookmark a page (Ctrl-D on Windows). Extensions may remove this | 37 to bookmark a page (Ctrl-D on Windows). Extensions may remove this shortcut |
| 38 shortcut via the settings overrides, and optionally bind their own command | 38 via the settings overrides, and optionally bind their own command to it |
| 39 to it using the <code>commands</code> section of the manifest. | 39 using the <code>commands</code> section of the manifest. If the shortcut key |
| 40 is removed or rebound, the corresponding menu item as also removed or |
| 41 overridden respectively. |
| 40 </li> | 42 </li> |
| 41 </ul> | 43 </ul> |
| 42 </p> | 44 </p> |
| 43 | 45 |
| 44 <p class="note"> | 46 <p class="note"> |
| 45 <b>Note:</b> Settings overrides for <code>bookmarks_ui</code> are only enabled | 47 <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 | 48 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 | 49 <code>--enable-override-bookmarks-ui=1</code> command line flag to enable |
| 48 bookmarks user interface overrides.</p> | 50 bookmarks user interface overrides.</p> |
| 49 | 51 |
| 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> | 52 <h2 id="reference">Reference</h2> |
| 93 <p> | 53 <p> |
| 94 An extension can override one or more of the following properties in the | 54 An extension can override one or more of the following properties in the |
| 95 manifest: | 55 manifest: |
| 96 </p> | 56 </p> |
| 97 | 57 |
| 98 <ul> | 58 <ul> |
| 99 {{#f:apis.manifestTypes.byName.ChromeSettingsOverrides.properties}} | 59 {{#f:apis.manifestTypes.byName.ChromeUIOverrides.properties}} |
| 100 <li> | 60 <li> |
| 101 <p id="{{f.name}}"><b><code>{{f.name}}</code> ({{+partials.variable_type type:
f/}})</b></p> | 61 <p id="{{f.name}}"><b><code>{{f.name}}</code> ({{+partials.variable_type type:
f/}})</b></p> |
| 102 <p>{{f.description}}</p> | 62 <p>{{f.description}}</p> |
| 103 {{?f.properties}} | 63 {{?f.properties}} |
| 104 <table> | 64 <table> |
| 105 <tr><th>Type</th><th>Attribute</th><th>Description</th></tr> | 65 <tr><th>Type</th><th>Attribute</th><th>Description</th></tr> |
| 106 {{+partials.type_item | 66 {{+partials.type_item |
| 107 title:f.strings.properties | 67 title:f.strings.properties |
| 108 display_name:display_name | 68 display_name:display_name |
| 109 items:f.properties | 69 items:f.properties |
| 110 item_partial:(partials.parameter_full hideParamTOC:true)/}} | 70 item_partial:(partials.parameter_full hideParamTOC:true)/}} |
| 111 </table> | 71 </table> |
| 112 {{/}} | 72 {{/}} |
| 113 {{/}} | 73 {{/}} |
| 114 </ul> | 74 </ul> |
| 115 | |
| OLD | NEW |