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

Unified Diff: chrome/common/extensions/docs/static/override.html

Issue 376001: ntp.html -> override.html (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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> &mdash;
+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>&lt;title>New&nbsp;Tab&lt;/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 &mdash;
+ with top pages,
+ recently closed pages,
+ tips,
+ a theme background image,
+ and so on &mdash;
+ 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

Powered by Google App Engine
This is Rietveld 408576698