| Index: chrome/common/extensions/docs/static/override.html
|
| ===================================================================
|
| --- chrome/common/extensions/docs/static/override.html (revision 0)
|
| +++ chrome/common/extensions/docs/static/override.html (revision 0)
|
| @@ -0,0 +1,134 @@
|
| +<style>
|
| +#pics {
|
| + margin:2em 1em 1.5em;
|
| +}
|
| +
|
| +#pics td {
|
| + text-align:center;
|
| + width:50%!important;
|
| + border:none;
|
| + padding:0 1em;
|
| + font-size:90%;
|
| +}
|
| +
|
| +#pics img {
|
| + width:188;
|
| + height:246;
|
| + border:none;
|
| +}
|
| +</style>
|
| +
|
| +<div id="pageData-title" class="pageData">Override Pages</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.
|
| +</p>
|
| +
|
| +<p>
|
| +Currently, the only page you can replace is
|
| +the <em>New Tab page</em> —
|
| +the page that appears
|
| +when the user creates a new tab or window.
|
| +</p>
|
| +
|
| +<table id="pics">
|
| + <tr>
|
| + <td> <b>The default New Tab page</b> </td>
|
| + <td> <b>An alternative New Tab page</b> </td>
|
| + </tr>
|
| + <tr>
|
| + <td>
|
| + <img src="images/ntp-default.png"
|
| + alt="default New Tab page">
|
| + </td>
|
| + <td>
|
| + <img src="images/ntp-blank.png"
|
| + alt="a blank New Tab page">
|
| + </td>
|
| + </tr>
|
| +</table>
|
| +
|
| +
|
| +<p class="comment">
|
| +[PENDING: update these screenshots.]
|
| +</p>
|
| +
|
| +<h2 id="manifest">Manifest</h2>
|
| +
|
| +<p>
|
| +Register your New Tab page in the
|
| +<a href="manifest.html">extension manifest</a>
|
| +like this:
|
| +</p>
|
| +
|
| +<pre>
|
| +"chrome_url_overrides": {
|
| + "newtab": "newtab.html"
|
| +}
|
| +</pre>
|
| +
|
| +<h2 id="tips">Tips</h2>
|
| +
|
| +<p>
|
| +For an effective New Tab page, follow these guidelines:
|
| +</p>
|
| +
|
| +<ul>
|
| + <li>
|
| + <p>
|
| + <b>Make your page quick and small.</b> <br />
|
| + Because the New Tab page appears often,
|
| + its performance is important.
|
| + 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.
|
| + Here's an example of specifying the title:
|
| + <code><title>New Tab</title></code>
|
| + </p>
|
| +
|
| + <li>
|
| + <p>
|
| + <b>Don't rely on the page having the keyboard focus.</b> <br />
|
| + The address bar always gets the focus first
|
| + when the user creates a new tab.
|
| + </p>
|
| + </li>
|
| + <li>
|
| + <p>
|
| + <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 —
|
| + with top pages,
|
| + recently closed pages,
|
| + tips,
|
| + a theme background image,
|
| + and so on —
|
| + don't exist yet.
|
| + Until they do,
|
| + you're better off trying to make something completely different.
|
| + </p>
|
| + </li>
|
| +</ul>
|
| +
|
| +<h2 id="examples">Examples</h2>
|
| +
|
| +<p>
|
| +For an example of specifying a very simple New Tab page,
|
| +see the
|
| +<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/samples/override_igoogle/">override_igoogle</a> sample.
|
| +It uses a 3-line file named <code>redirect.html</code>
|
| +to implement the New Tab page.
|
| +</p>
|
| +
|
| +<p class="comment">
|
| +[PENDING: Maybe have a gallery of NTPs?]
|
| +</p>
|
|
|
| Property changes on: chrome/common/extensions/docs/static/override.html
|
| ___________________________________________________________________
|
| Added: svn:mime-type
|
| + text/html
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|