diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 09:24:34 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 09:24:34 +0000 |
commit | 7b021236c755ec18b9d9d090bddd1a5a8de46349 (patch) | |
tree | 60e101859ae0563f5d02635c9e6d2ca3f72b81b1 /chrome | |
parent | f39a6c2e07718a0806f288a2c68939dd6abed026 (diff) | |
download | chromium_src-7b021236c755ec18b9d9d090bddd1a5a8de46349.zip chromium_src-7b021236c755ec18b9d9d090bddd1a5a8de46349.tar.gz chromium_src-7b021236c755ec18b9d9d090bddd1a5a8de46349.tar.bz2 |
Merge 33981 - Make all the manifest examples consistent.
Also added/removed a few commas.
TBR=aa
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/465102
TBR=kathyw@google.com
Review URL: http://codereview.chromium.org/506035
git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@34702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
26 files changed, 168 insertions, 102 deletions
diff --git a/chrome/common/extensions/docs/autoupdate.html b/chrome/common/extensions/docs/autoupdate.html index 2397a4c..c9c67d1 100644 --- a/chrome/common/extensions/docs/autoupdate.html +++ b/chrome/common/extensions/docs/autoupdate.html @@ -301,9 +301,11 @@ <a name="H2-1"></a><h2>Update URL</h2> <p>For those who are hosting their own extensions, you need to add the "update_url" key to your <a href="manifest.html">manifest.json</a> file like this:</p> + <pre>{ + "name": "My extension", ... - "update_url": "http://myhost.com/mytestextension/updates.xml", + <b>"update_url": "http://myhost.com/mytestextension/updates.xml"</b>, ... } </pre> diff --git a/chrome/common/extensions/docs/background_pages.html b/chrome/common/extensions/docs/background_pages.html index 258a618..a42808f9 100644 --- a/chrome/common/extensions/docs/background_pages.html +++ b/chrome/common/extensions/docs/background_pages.html @@ -297,8 +297,12 @@ Register your background page in the like this: </p> -<pre>"background_page": "background.html" -</pre> +<pre>{ + "name": "My extension", + ... + <b>"background_page": "background.html"</b>, + ... +}</pre> <a name="H2-1"></a><h2>Details</h2> diff --git a/chrome/common/extensions/docs/bookmarks.html b/chrome/common/extensions/docs/bookmarks.html index e98e87d..6b1e178 100644 --- a/chrome/common/extensions/docs/bookmarks.html +++ b/chrome/common/extensions/docs/bookmarks.html @@ -301,9 +301,9 @@ in the <a href="manifest.html">extension manifest</a> to use the bookmarks API. For example:</p> <pre>{ - "name": "My extension that uses bookmarks", - "version": "0.1", -<b> "permissions": [ + "name": "My extension", + ... + <b>"permissions": [ "bookmarks" ]</b>, ... diff --git a/chrome/common/extensions/docs/browserAction.html b/chrome/common/extensions/docs/browserAction.html index 6401dfc..0cbbf75 100644 --- a/chrome/common/extensions/docs/browserAction.html +++ b/chrome/common/extensions/docs/browserAction.html @@ -319,10 +319,15 @@ Register your browser action in the like this: </p> -<pre>"browser_action": { - "default_icon": "images/icon19.png", <em>// <b>required</b></em> - "default_title": "Google Mail", <em>// optional; shown in tooltip</em> - "popup": "popup.html" <em>// optional</em> +<pre>{ + "name": "My extension", + ... + <b>"browser_action": { + "default_icon": "images/icon19.png", <em>// <b>required</b></em> + "default_title": "Google Mail", <em>// optional; shown in tooltip</em> + "popup": "popup.html" <em>// optional</em> + }</b>, + ... }</pre> <h2 id="ui">Parts of the UI</h2> diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html index 9923d1d..3044ee7 100644 --- a/chrome/common/extensions/docs/content_scripts.html +++ b/chrome/common/extensions/docs/content_scripts.html @@ -345,14 +345,18 @@ learn about the <p>Content scripts are registered in an extension's <a href="manifest.html">manifest.json</a> file, like so: -</p><pre>"content_scripts": [ - { - "matches": ["http://www.google.com/*"], - "css": ["mystyles.css"], - "js": ["jquery.js", "myscript.js"] - } -] -</pre> +</p><pre>{ + "name": "My extension", + ... + <b>"content_scripts": [ + { + "matches": ["http://www.google.com/*"], + "css": ["mystyles.css"], + "js": ["jquery.js", "myscript.js"] + } + ]</b>, + ... +}</pre> <p>An extension can contain any number of content scripts, and a content script can consist of any number of JavaScript or CSS files. The value of the <code>matches</code> property controls when the content script will run. diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html index 853e358..ae3b185 100644 --- a/chrome/common/extensions/docs/manifest.html +++ b/chrome/common/extensions/docs/manifest.html @@ -301,8 +301,8 @@ are <b>name</b> and <b>version</b>. "<a href="content_scripts.html">content_scripts</a>": [...], "<a href="options.html">options_page</a>": "<em>aFile</em>.html", "<a href="#permissions">permissions</a>": [...], - "<a href="npapi.html">plugins</a>": [...] - "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml", + "<a href="npapi.html">plugins</a>": [...], + "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml" } </pre> diff --git a/chrome/common/extensions/docs/npapi.html b/chrome/common/extensions/docs/npapi.html index b154818..cde937d 100644 --- a/chrome/common/extensions/docs/npapi.html +++ b/chrome/common/extensions/docs/npapi.html @@ -289,10 +289,11 @@ follow these steps to get your extension using it. <pre>{ "name": "My extension", ... -<b> "plugins": [ + <b>"plugins": [ { "path": "content_plugin.dll", "public": true }, { "path": "extension_plugin.dll" } - ]</b> + ]</b>, + ... }</pre> <p> diff --git a/chrome/common/extensions/docs/options.html b/chrome/common/extensions/docs/options.html index 5173594..80140c0 100644 --- a/chrome/common/extensions/docs/options.html +++ b/chrome/common/extensions/docs/options.html @@ -261,19 +261,18 @@ <!-- /TABLE OF CONTENTS --> <!-- STATIC CONTENT PLACEHOLDER --> - <div id="static"><div id="pageData-name class=" pagedata"="">Options</div> + <div id="static"><div id="pageData-name" class="pageData">Options</div> <div id="pageData-showTOC" class="pageData">true</div> <p>To allow users to customize the behavior of your extension, you may wish to provide an options page. If you do, a link to it will be provided from the extensions management page at chrome://extensions. Clicking the Options link opens a new tab pointing at your options page. </p><a name="H2-0"></a><h2>Step 1: Declare your options page in the manifest</h2> <pre>{ - "name": "Test Extension", - "version": "1.0", - "description": "This is a test", - <b>"options_page": "options.html"</b> -} -</pre> + "name": "My extension", + ... + <b>"options_page": "options.html"</b>, + ... +}</pre> <a name="H2-1"></a><h2>Step 2: Write your options page</h2> diff --git a/chrome/common/extensions/docs/override.html b/chrome/common/extensions/docs/override.html index 0b9736d..6e8f14a 100644 --- a/chrome/common/extensions/docs/override.html +++ b/chrome/common/extensions/docs/override.html @@ -325,10 +325,14 @@ Register your New Tab page in the like this: </p> -<pre>"chrome_url_overrides": { - "newtab": "newtab.html" -} -</pre> +<pre>{ + "name": "My extension", + ... + <b>"chrome_url_overrides": { + "newtab": "newtab.html" + }</b>, + ... +}</pre> <h2 id="tips">Tips</h2> diff --git a/chrome/common/extensions/docs/pageAction.html b/chrome/common/extensions/docs/pageAction.html index 5d2a58e..3b693da 100644 --- a/chrome/common/extensions/docs/pageAction.html +++ b/chrome/common/extensions/docs/pageAction.html @@ -312,10 +312,15 @@ Register your page action in the like this: </p> -<pre>"page_action": { - "default_icon": "icons/foo.png", <em>// <b>required</b></em> - "default_title": "Do action", <em>// optional; shown in tooltip</em> - "popup": "popup.html" <em>// optional</em> +<pre>{ + "name": "My extension", + ... + <b>"page_action": { + "default_icon": "icons/foo.png", <em>// <b>required</b></em> + "default_title": "Do action", <em>// optional; shown in tooltip</em> + "popup": "popup.html" <em>// optional</em> + }</b>, + ... }</pre> <h2 id="ui">Parts of the UI</h2> diff --git a/chrome/common/extensions/docs/static/autoupdate.html b/chrome/common/extensions/docs/static/autoupdate.html index 0a49290..4b5ad22 100644 --- a/chrome/common/extensions/docs/static/autoupdate.html +++ b/chrome/common/extensions/docs/static/autoupdate.html @@ -17,9 +17,11 @@ <h2>Update URL</h2> <p>For those who are hosting their own extensions, you need to add the "update_url" key to your <a href="manifest.html">manifest.json</a> file like this:</p> + <pre>{ + "name": "My extension", ... - "update_url": "http://myhost.com/mytestextension/updates.xml", + <b>"update_url": "http://myhost.com/mytestextension/updates.xml"</b>, ... } </pre> diff --git a/chrome/common/extensions/docs/static/background_pages.html b/chrome/common/extensions/docs/static/background_pages.html index e11fb80..2fd8a837 100644 --- a/chrome/common/extensions/docs/static/background_pages.html +++ b/chrome/common/extensions/docs/static/background_pages.html @@ -34,9 +34,12 @@ Register your background page in the like this: </p> -<pre> -"background_page": "background.html" -</pre> +<pre>{ + "name": "My extension", + ... + <b>"background_page": "background.html"</b>, + ... +}</pre> <h2>Details</h2> diff --git a/chrome/common/extensions/docs/static/bookmarks.html b/chrome/common/extensions/docs/static/bookmarks.html index 75de341..cd565dc 100644 --- a/chrome/common/extensions/docs/static/bookmarks.html +++ b/chrome/common/extensions/docs/static/bookmarks.html @@ -15,9 +15,9 @@ in the <a href="manifest.html">extension manifest</a> to use the bookmarks API. For example:</p> <pre>{ - "name": "My extension that uses bookmarks", - "version": "0.1", -<b> "permissions": [ + "name": "My extension", + ... + <b>"permissions": [ "bookmarks" ]</b>, ... diff --git a/chrome/common/extensions/docs/static/browserAction.html b/chrome/common/extensions/docs/static/browserAction.html index 28711cc..d028156 100644 --- a/chrome/common/extensions/docs/static/browserAction.html +++ b/chrome/common/extensions/docs/static/browserAction.html @@ -38,10 +38,15 @@ Register your browser action in the like this: </p> -<pre>"browser_action": { - "default_icon": "images/icon19.png", <em>// <b>required</b></em> - "default_title": "Google Mail", <em>// optional; shown in tooltip</em> - "popup": "popup.html" <em>// optional</em> +<pre>{ + "name": "My extension", + ... + <b>"browser_action": { + "default_icon": "images/icon19.png", <em>// <b>required</b></em> + "default_title": "Google Mail", <em>// optional; shown in tooltip</em> + "popup": "popup.html" <em>// optional</em> + }</b>, + ... }</pre> <h2 id="ui">Parts of the UI</h2> diff --git a/chrome/common/extensions/docs/static/content_scripts.html b/chrome/common/extensions/docs/static/content_scripts.html index 96ae9a4c..ffd3c89 100644 --- a/chrome/common/extensions/docs/static/content_scripts.html +++ b/chrome/common/extensions/docs/static/content_scripts.html @@ -61,15 +61,18 @@ learn about the <p>Content scripts are registered in an extension's <a href="manifest.html">manifest.json</a> file, like so: -<pre> -"content_scripts": [ - { - "matches": ["http://www.google.com/*"], - "css": ["mystyles.css"], - "js": ["jquery.js", "myscript.js"] - } -] -</pre> +<pre>{ + "name": "My extension", + ... + <b>"content_scripts": [ + { + "matches": ["http://www.google.com/*"], + "css": ["mystyles.css"], + "js": ["jquery.js", "myscript.js"] + } + ]</b>, + ... +}</pre> <p>An extension can contain any number of content scripts, and a content script can consist of any number of JavaScript or CSS files. The value of the <code>matches</code> property controls when the content script will run. diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html index 5bc5304..29f661b 100644 --- a/chrome/common/extensions/docs/static/manifest.html +++ b/chrome/common/extensions/docs/static/manifest.html @@ -38,8 +38,8 @@ are <b>name</b> and <b>version</b>. "<a href="content_scripts.html">content_scripts</a>": [...], "<a href="options.html">options_page</a>": "<em>aFile</em>.html", "<a href="#permissions">permissions</a>": [...], - "<a href="npapi.html">plugins</a>": [...] - "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml", + "<a href="npapi.html">plugins</a>": [...], + "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml" } </pre> diff --git a/chrome/common/extensions/docs/static/npapi.html b/chrome/common/extensions/docs/static/npapi.html index f6f33b9..8490bb3 100644 --- a/chrome/common/extensions/docs/static/npapi.html +++ b/chrome/common/extensions/docs/static/npapi.html @@ -40,10 +40,11 @@ follow these steps to get your extension using it. <pre>{ "name": "My extension", ... -<b> "plugins": [ + <b>"plugins": [ { "path": "content_plugin.dll", "public": true }, { "path": "extension_plugin.dll" } - ]</b> + ]</b>, + ... }</pre> <p> diff --git a/chrome/common/extensions/docs/static/options.html b/chrome/common/extensions/docs/static/options.html index e91168f..6c854b6 100644 --- a/chrome/common/extensions/docs/static/options.html +++ b/chrome/common/extensions/docs/static/options.html @@ -1,16 +1,15 @@ -<div id="pageData-name class="pageData">Options</div> +<div id="pageData-name" class="pageData">Options</div> <div id="pageData-showTOC" class="pageData">true</div> <p>To allow users to customize the behavior of your extension, you may wish to provide an options page. If you do, a link to it will be provided from the extensions management page at chrome://extensions. Clicking the Options link opens a new tab pointing at your options page. <h2>Step 1: Declare your options page in the manifest</h2> <pre>{ - "name": "Test Extension", - "version": "1.0", - "description": "This is a test", - <b>"options_page": "options.html"</b> -} -</pre> + "name": "My extension", + ... + <b>"options_page": "options.html"</b>, + ... +}</pre> <h2>Step 2: Write your options page</h2> diff --git a/chrome/common/extensions/docs/static/override.html b/chrome/common/extensions/docs/static/override.html index 77586ce..1ef5299 100644 --- a/chrome/common/extensions/docs/static/override.html +++ b/chrome/common/extensions/docs/static/override.html @@ -64,11 +64,14 @@ Register your New Tab page in the like this: </p> -<pre> -"chrome_url_overrides": { - "newtab": "newtab.html" -} -</pre> +<pre>{ + "name": "My extension", + ... + <b>"chrome_url_overrides": { + "newtab": "newtab.html" + }</b>, + ... +}</pre> <h2 id="tips">Tips</h2> diff --git a/chrome/common/extensions/docs/static/pageAction.html b/chrome/common/extensions/docs/static/pageAction.html index bcf3b1a..24d54ae 100755 --- a/chrome/common/extensions/docs/static/pageAction.html +++ b/chrome/common/extensions/docs/static/pageAction.html @@ -37,10 +37,15 @@ Register your page action in the like this: </p> -<pre>"page_action": { - "default_icon": "icons/foo.png", <em>// <b>required</b></em> - "default_title": "Do action", <em>// optional; shown in tooltip</em> - "popup": "popup.html" <em>// optional</em> +<pre>{ + "name": "My extension", + ... + <b>"page_action": { + "default_icon": "icons/foo.png", <em>// <b>required</b></em> + "default_title": "Do action", <em>// optional; shown in tooltip</em> + "popup": "popup.html" <em>// optional</em> + }</b>, + ... }</pre> <h2 id="ui">Parts of the UI</h2> diff --git a/chrome/common/extensions/docs/static/tabs.html b/chrome/common/extensions/docs/static/tabs.html index 092cb63..b20ee50 100644 --- a/chrome/common/extensions/docs/static/tabs.html +++ b/chrome/common/extensions/docs/static/tabs.html @@ -15,12 +15,14 @@ create, modify, and rearrange tabs in the browser. <p>You must declare the "tabs" permission in your extension's manifest to use the tabs API. For example: </p> + <pre>{ - "name": "My extension that uses tabs", - "version": "0.1", -<b> "permissions": [ + "name": "My extension", + ... + <b>"permissions": [ "tabs" - ]</b> + ]</b>, + ... }</pre> <h2 id="examples"> Examples </h2> diff --git a/chrome/common/extensions/docs/static/windows.html b/chrome/common/extensions/docs/static/windows.html index 5a9f6e7..19925bc 100644 --- a/chrome/common/extensions/docs/static/windows.html +++ b/chrome/common/extensions/docs/static/windows.html @@ -21,9 +21,13 @@ the window and tabs modules interact so closely we decided to just share one permission between them.) For example: </p> -<pre> -"permissions": ["tabs"] -</pre> + +<pre>{ + "name": "My extension", + ... + <b>"permissions": ["tabs"]</b>, + ... +}</pre> <h2 id="current-window">The current window</h2> diff --git a/chrome/common/extensions/docs/static/xhr.html b/chrome/common/extensions/docs/static/xhr.html index 332eb2c..01d36fe 100644 --- a/chrome/common/extensions/docs/static/xhr.html +++ b/chrome/common/extensions/docs/static/xhr.html @@ -39,10 +39,14 @@ unless the extension has requested the appropriate cross-origin permissions. <a href="manifest.html">manifest</a> file, the extension can request access to remote servers outside of its origin.</p> -<pre>"permissions": [ - "http://www.google.com/", -], -</pre> +<pre>{ + "name": "My extension", + ... + <b>"permissions": [ + "http://www.google.com/" + ]</b>, + ... +}</pre> <p>Cross-origin permission values can be fully qualified host names, like these:</p> @@ -72,8 +76,8 @@ of hosts, it must declare the permissions separately:</p> <pre>"permissions": [ "http://www.google.com/", - "https://www.google.com/", -], + "https://www.google.com/" +] </pre> <h2 id="security-considerations">Security considerations</h2> diff --git a/chrome/common/extensions/docs/tabs.html b/chrome/common/extensions/docs/tabs.html index 3e52a39..8477c3a 100644 --- a/chrome/common/extensions/docs/tabs.html +++ b/chrome/common/extensions/docs/tabs.html @@ -306,12 +306,14 @@ create, modify, and rearrange tabs in the browser. <p>You must declare the "tabs" permission in your extension's manifest to use the tabs API. For example: </p> + <pre>{ - "name": "My extension that uses tabs", - "version": "0.1", -<b> "permissions": [ + "name": "My extension", + ... + <b>"permissions": [ "tabs" - ]</b> + ]</b>, + ... }</pre> <h2 id="examples"> Examples </h2> diff --git a/chrome/common/extensions/docs/windows.html b/chrome/common/extensions/docs/windows.html index ad75f34..ec9cdfc 100644 --- a/chrome/common/extensions/docs/windows.html +++ b/chrome/common/extensions/docs/windows.html @@ -292,8 +292,13 @@ the window and tabs modules interact so closely we decided to just share one permission between them.) For example: </p> -<pre>"permissions": ["tabs"] -</pre> + +<pre>{ + "name": "My extension", + ... + <b>"permissions": ["tabs"]</b>, + ... +}</pre> <h2 id="current-window">The current window</h2> diff --git a/chrome/common/extensions/docs/xhr.html b/chrome/common/extensions/docs/xhr.html index 5aaf1c0..7e8ca6e 100644 --- a/chrome/common/extensions/docs/xhr.html +++ b/chrome/common/extensions/docs/xhr.html @@ -287,10 +287,14 @@ unless the extension has requested the appropriate cross-origin permissions. <a href="manifest.html">manifest</a> file, the extension can request access to remote servers outside of its origin.</p> -<pre>"permissions": [ - "http://www.google.com/", -], -</pre> +<pre>{ + "name": "My extension", + ... + <b>"permissions": [ + "http://www.google.com/" + ]</b>, + ... +}</pre> <p>Cross-origin permission values can be fully qualified host names, like these:</p> @@ -320,8 +324,8 @@ of hosts, it must declare the permissions separately:</p> <pre>"permissions": [ "http://www.google.com/", - "https://www.google.com/", -], + "https://www.google.com/" +] </pre> <h2 id="security-considerations">Security considerations</h2> |