diff options
author | kathyw@chromium.org <kathyw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 21:39:03 +0000 |
---|---|---|
committer | kathyw@chromium.org <kathyw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 21:39:03 +0000 |
commit | 1239af15394f84827718c0c1327afd85c6bd1c22 (patch) | |
tree | c772172791699ea9e80326e6dc86fdb2a19e6de3 /chrome/common/extensions/docs | |
parent | e16c7bd2c1eb7242163630bb9f6bc54534d69577 (diff) | |
download | chromium_src-1239af15394f84827718c0c1327afd85c6bd1c22.zip chromium_src-1239af15394f84827718c0c1327afd85c6bd1c22.tar.gz chromium_src-1239af15394f84827718c0c1327afd85c6bd1c22.tar.bz2 |
Document that you can override the Bookmark Manager page.
Point to this from the chrome.bookmarks page.
Besides adding Bookmark Manager info, I also reorganized things a bit and added the URL for each page. Is mentioning the URLs OK? (I've found them handy, but maybe we don't want to commit to them.)
BUG=40806
TEST=none
Review URL: http://codereview.chromium.org/1633017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs')
-rw-r--r-- | chrome/common/extensions/docs/bookmarks.html | 2 | ||||
-rw-r--r-- | chrome/common/extensions/docs/override.html | 94 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/bookmarks.html | 2 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/override.html | 92 |
4 files changed, 123 insertions, 67 deletions
diff --git a/chrome/common/extensions/docs/bookmarks.html b/chrome/common/extensions/docs/bookmarks.html index 011feeb..cb12c07 100644 --- a/chrome/common/extensions/docs/bookmarks.html +++ b/chrome/common/extensions/docs/bookmarks.html @@ -305,6 +305,8 @@ <p id="classSummary"> Use the <code>chrome.bookmarks</code> module to create, organize, and otherwise manipulate bookmarks. +Also see <a href="override.html">Override Pages</a>, +which you can use to create a custom Bookmark Manager page. </p> <img src="images/bookmarks.png" width="210" height="147" alt="Clicking the star adds a bookmark"> diff --git a/chrome/common/extensions/docs/override.html b/chrome/common/extensions/docs/override.html index e6dd31b..07b5724 100644 --- a/chrome/common/extensions/docs/override.html +++ b/chrome/common/extensions/docs/override.html @@ -289,24 +289,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: </p><ul> - <li> The <em>New Tab page</em> — - 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> — - 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> + +<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"> <tbody><tr> <td> <b>The default New Tab page</b> </td> @@ -325,58 +353,56 @@ 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><li> <code>history</code> + </li><li> <code>newtab</code> +</li></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><title>New Tab</title></code> </p> - - </li><li> + </li> + <li> <p> <b>Don't rely on the page having the keyboard focus.</b> <br> The address bar always gets the focus first @@ -385,7 +411,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 — with top pages, diff --git a/chrome/common/extensions/docs/static/bookmarks.html b/chrome/common/extensions/docs/static/bookmarks.html index 1182a8c..dd01422b 100644 --- a/chrome/common/extensions/docs/static/bookmarks.html +++ b/chrome/common/extensions/docs/static/bookmarks.html @@ -4,6 +4,8 @@ <p id="classSummary"> Use the <code>chrome.bookmarks</code> module to create, organize, and otherwise manipulate bookmarks. +Also see <a href="override.html">Override Pages</a>, +which you can use to create a custom Bookmark Manager page. </p> <img src="images/bookmarks.png" 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> — - 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> — - 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><title>New Tab</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 — with top pages, |