summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/static/override.html
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions/docs/static/override.html')
-rw-r--r--chrome/common/extensions/docs/static/override.html92
1 files changed, 59 insertions, 33 deletions
diff --git a/chrome/common/extensions/docs/static/override.html b/chrome/common/extensions/docs/static/override.html
index 53de45c..5bf20da0 100644
--- a/chrome/common/extensions/docs/static/override.html
+++ b/chrome/common/extensions/docs/static/override.html
@@ -22,24 +22,52 @@
<div id="pageData-showTOC" class="pageData">true</div>
<p>
-Override pages are a way to replace a page
-that Google Chrome provides
-with an HTML file that your extension provides.
-An override page usually has CSS and JavaScript code,
-in addition to HTML. A single extension can only override
-one page.
+Override pages are a way to substitute an HTML file from your extension
+for a page that Google Chrome normally provides.
+In addition to HTML,
+an override page usually has CSS and JavaScript code.
</p>
<p>
-Currently, extensions can replace two pages:
+An extension can replace any one of the following pages:
<ul>
- <li> The <em>New Tab page</em> &mdash;
- the page that appears when the user creates a new tab or window.</li>
+ <li> <b>Bookmark Manager:</b>
+ The page that appears when the user chooses
+ the Bookmark Manager menu item
+ from the Tools (wrench) menu or, on Mac,
+ the Bookmark Manager item from the Bookmarks menu.
+ You can also get to this page by entering the URL
+ <b>chrome://bookmarks</b>.
+ </li>
+
+ <li> <b>History:</b>
+ The page that appears when the user
+ chooses the History menu item
+ from the Tools (wrench) menu or, on Mac,
+ the Show Full History item from the History menu.
+ You can also get to this page by entering the URL
+ <b>chrome://history</b>.
+ </li>
- <li> The <em>History page</em> &mdash;
- the page that appears when the user selects the 'History' menu item.</li>
+ <li> <b>New Tab:</b>
+ The page that appears when the user creates a new tab or window.
+ You can also get to this page by entering the URL
+ <b>chrome://newtab</b>.
+ </li>
</ul>
</p>
+
+<p class="note">
+<b>Note:</b>
+A single extension can override
+only one page.
+</p>
+
+<p>
+The following screenshots show the default New Tab page
+next to a custom New Tab page.
+</p>
+
<table id="pics">
<tr>
<td> <b>The default New Tab page</b> </td>
@@ -62,57 +90,55 @@ Currently, extensions can replace two pages:
<h2 id="manifest">Manifest</h2>
<p>
-Register override pages in the
-<a href="manifest.html">extension manifest</a>
-using property <code>chrome_url_overrides</code>. For example, the new tabs page can be overridden like this:
+Register an override page in the
+<a href="manifest.html">extension manifest</a> like this:
</p>
<pre>{
"name": "My extension",
...
- <b>"chrome_url_overrides": {
- "newtab": "newtab.html"
+
+<b> "chrome_url_overrides" : {
+ "<em>pageToOverride</em>": "<em>myPage.html</em>"
}</b>,
...
}</pre>
-You can override the history page like this:
+<p>
+For <code><em>pageToOverride</em></code>, substitute one of the following:
+</p>
-<pre>{
- "name": "My extension",
- ...
- <b>"chrome_url_overrides": {
- "history": "history.html"
- }</b>,
- ...
-}</pre>
+<ul>
+ <li> <code>bookmarks</code>
+ <li> <code>history</code>
+ <li> <code>newtab</code>
+</ul>
-A single extension may only override one page.
<h2 id="tips">Tips</h2>
<p>
-For an effective override pages, follow these guidelines:
+For an effective override page, follow these guidelines:
</p>
<ul>
<li>
<p>
<b>Make your page quick and small.</b> <br />
- Users expect built in browser pages to open instantly. Avoid doing things that
- may take a long time.
+ Users expect built-in browser pages to open instantly.
+ Avoid doing things that might take a long time.
For example, avoid synchronous fetches of network or database resources.
</p>
</li>
<li>
<p>
<b>Include a title in your page.</b> <br />
- Otherwise people will see the URL of the page,
- which might confuse them.
+ Otherwise people might see the URL of the page,
+ which could be confusing.
Here's an example of specifying the title:
<code>&lt;title>New&nbsp;Tab&lt;/title></code>
</p>
-
+ </li>
<li>
<p>
<b>Don't rely on the page having the keyboard focus.</b> <br />
@@ -122,7 +148,7 @@ For an effective override pages, follow these guidelines:
</li>
<li>
<p>
- <b>Don't try to emulate the default pages.</b> <br />
+ <b>Don't try to emulate the default New Tab page.</b> <br />
The APIs necessary to create
a slightly modified version of the default New Tab page &mdash;
with top pages,