summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/static
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions/docs/static')
-rw-r--r--chrome/common/extensions/docs/static/browserAction.html8
-rw-r--r--chrome/common/extensions/docs/static/content_scripts.html28
-rw-r--r--chrome/common/extensions/docs/static/getstarted.html13
-rw-r--r--chrome/common/extensions/docs/static/index.html2
-rw-r--r--chrome/common/extensions/docs/static/npapi.html8
-rwxr-xr-xchrome/common/extensions/docs/static/pageAction.html15
-rw-r--r--chrome/common/extensions/docs/static/samples.html2
7 files changed, 28 insertions, 48 deletions
diff --git a/chrome/common/extensions/docs/static/browserAction.html b/chrome/common/extensions/docs/static/browserAction.html
index 514f760..0d42e60 100644
--- a/chrome/common/extensions/docs/static/browserAction.html
+++ b/chrome/common/extensions/docs/static/browserAction.html
@@ -41,17 +41,11 @@ 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>
- "default_icon": "images/icon19.png", <em>// optional</em>
"popup": "popup.html" <em>// optional</em>
}</pre>
-<p><b>Note:</b> Even if you don't include
- any of the values, you must include an empty
- <b>browser_action</b> entry in the manifest
- so that the system reserves space
- for your browser action in the toolbar.</p>
-
<h2 id="ui">Parts of the UI</h2>
<p>
diff --git a/chrome/common/extensions/docs/static/content_scripts.html b/chrome/common/extensions/docs/static/content_scripts.html
index 0c5bcd9..cddf395 100644
--- a/chrome/common/extensions/docs/static/content_scripts.html
+++ b/chrome/common/extensions/docs/static/content_scripts.html
@@ -136,13 +136,14 @@ learn about the
<pre>hello.html
==========
&lt;html&gt;
- &lt;button id="button"&gt;click me&lt;/button&gt;
+ &lt;button id="mybutton"&gt;click me&lt;/button&gt;
&lt;script&gt;
- var greeting = "hello!";
- function sayGreeting() {
- alert(greeting);
- }
- document.getElementById("button").onclick = sayGreeting;
+ var greeting = "hello, ";
+ var button = document.getElementById("mybutton");
+ button.person_name = "Bob";
+ button.addEventListener("click", function() {
+ alert(greeting + button.person_name + ".");
+ }, false);
&lt;/script&gt;
&lt;/html&gt;</pre>
@@ -150,12 +151,13 @@ learn about the
<pre>contentscript.js
================
-console.log(greeting); // undefined
-console.log(sayGreeting); // undefined
-console.log(document.getElementById("button").onclick); // still undefined
-document.getElementById("button").onclick = function() {
- alert("hola!");
-}</pre>
+var greeting = "hola, ";
+var button = document.getElementById("mybutton");
+button.person_name = "Roberto";
+button.addEventListener("click", function() {
+ alert(greeting + button.person_name + ".");
+}, false);
+</pre>
<p>Now, if the button is pressed, you will see both greetings.
@@ -194,7 +196,7 @@ document.getElementById('myCustomEventDiv').addEventListener('myCustomEvent', fu
<h2 id="security-considerations">Security considerations</h2>
-When writing a content script, you should be aware of two security issues.
+<p>When writing a content script, you should be aware of two security issues.
First, be careful not to introduce security vulnerabilities into the web site
your content script is injected into. For example, if your content script
receives content from another web site (e.g., by <a
diff --git a/chrome/common/extensions/docs/static/getstarted.html b/chrome/common/extensions/docs/static/getstarted.html
index 2bcfd32..c82096b 100644
--- a/chrome/common/extensions/docs/static/getstarted.html
+++ b/chrome/common/extensions/docs/static/getstarted.html
@@ -17,14 +17,7 @@ The icon and page will look something like this:
<p>To develop extensions for Google Chrome,
you need to <a href="http://dev.chromium.org/getting-involved/dev-channel">subscribe
-to the Dev or Beta channel</a> of Google Chrome for Windows. Extensions aren't yet available in the stable channel.
-</p>
-
-<p>
-<b>Note:</b> This tutorial requires Windows.
-You can try it on Linux and OS X, and it might work,
-but the extensions support is less stable on those platforms.
-We're working hard to bring them up to speed.
+to the Dev Channel</a> of Google Chrome. Extensions aren't yet available in the beta or stable channels (but we're working hard on that!).
</p>
<h2 id="load">Create and load an extension</h2>
@@ -37,9 +30,6 @@ to the toolbar of Google Chrome.
<ol>
<li>
Create a folder somewhere on your computer to contain your extension's code.
- We'll assume the folder is located at
- <strong><code>c:\myext</code></strong>,
- but it can be anywhere.
</li>
<li>
Inside your extension's folder,
@@ -95,7 +85,6 @@ to the toolbar of Google Chrome.
<li>
In the file dialog,
navigate to your extension's folder
- (<code>c:\myext</code>, for example)
and click <b>OK</b>.
</li>
</ol> </li>
diff --git a/chrome/common/extensions/docs/static/index.html b/chrome/common/extensions/docs/static/index.html
index 5d9affe..9ad0f02 100644
--- a/chrome/common/extensions/docs/static/index.html
+++ b/chrome/common/extensions/docs/static/index.html
@@ -19,7 +19,7 @@
}
</style>
-<div id="pageData-title" class="pageData">Google Chrome Extensions: Developer Documentation</div>
+<div id="pageData-title" class="pageData">Developer Documentation</div>
<h3>Hello There!</h3>
diff --git a/chrome/common/extensions/docs/static/npapi.html b/chrome/common/extensions/docs/static/npapi.html
index 14542a9..ecf3787 100644
--- a/chrome/common/extensions/docs/static/npapi.html
+++ b/chrome/common/extensions/docs/static/npapi.html
@@ -9,6 +9,14 @@ You can bundle an NPAPI plugin with your extension,
allowing you to call into native binary code from JavaScript.
</p>
+<h2>Warning</h2>
+
+<p align="center"><b>NPAPI is a really big hammer that should only be used when no other approach will work.</b>
+
+<p>Code running in an NPAPI plugin has the full permissions of the current user and is not sandboxed or shielded from malicious input by Google Chrome in any way. You should be especially cautious when processing input from untrusted sources, such as when working with <a href="content_scripts.html#security-considerations">content scripts</a> or XMLHttpRequest.
+
+<p>Because of the additional security risks NPAPI poses to users, extensions that use it will require manual review before being accepted in the extension gallery.
+
<h2>Details</h2>
<p>
diff --git a/chrome/common/extensions/docs/static/pageAction.html b/chrome/common/extensions/docs/static/pageAction.html
index 08e34ec..ec49c4f 100755
--- a/chrome/common/extensions/docs/static/pageAction.html
+++ b/chrome/common/extensions/docs/static/pageAction.html
@@ -38,24 +38,11 @@ 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>
- "default_icon": "icons/foo.png", <em>// optional</em>
"popup": "popup.html" <em>// optional</em>
}</pre>
-<p><b>Note:</b> Even if you don't include
- any of the values,
- you must include an empty <b>page_action</b> entry
- in your manifest so that the system
- reserves a slot for your page action
- in the address bar.</p>
-
-<p>
-Set "default_icon" if at all possible.
-Users see the default icon when they install your extension,
-which helps them know what to look for when your page action
-is active for a given page.</p>
-
<h2 id="ui">Parts of the UI</h2>
<p>
diff --git a/chrome/common/extensions/docs/static/samples.html b/chrome/common/extensions/docs/static/samples.html
index 8a5c3d1..eab6cd0 100644
--- a/chrome/common/extensions/docs/static/samples.html
+++ b/chrome/common/extensions/docs/static/samples.html
@@ -14,7 +14,7 @@ Each sample also has links to the documentation
for each feature used by the sample.
</p>
-<p><b>Note:</b> To run these samples, you need to be using the <a href="http://dev.chromium.org/getting-involved/dev-channel">Dev or Beta channel</a> of Google Chrome.
+<p><b>Note:</b> To run these samples, you need to be using the <a href="http://dev.chromium.org/getting-involved/dev-channel">Dev Channel</a> of Google Chrome.
<p>
For more example code, see the