| OLD | NEW |
| 1 <div id="pageData-title" class="pageData">Content Scripts</div> | 1 <div id="pageData-name" class="pageData">Content Scripts</div> |
| 2 <div id="pageData-showTOC" class="pageData">true</div> | 2 <div id="pageData-showTOC" class="pageData">true</div> |
| 3 | 3 |
| 4 <p> | 4 <p> |
| 5 Content scripts are JavaScript files that run in the context of web pages. | 5 Content scripts are JavaScript files that run in the context of web pages. |
| 6 By using the standard | 6 By using the standard |
| 7 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/">Document | 7 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/">Document |
| 8 Object Model</a> (DOM), | 8 Object Model</a> (DOM), |
| 9 they can read details of the web pages the browser visits, | 9 they can read details of the web pages the browser visits, |
| 10 or make changes to them. | 10 or make changes to them. |
| 11 </p> | 11 </p> |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 just like you would any other URL, | 259 just like you would any other URL, |
| 260 as the following code shows. | 260 as the following code shows. |
| 261 </p> | 261 </p> |
| 262 | 262 |
| 263 | 263 |
| 264 <pre> | 264 <pre> |
| 265 <em>//Code for displaying <extensionDir>/images/myimage.png:</em> | 265 <em>//Code for displaying <extensionDir>/images/myimage.png:</em> |
| 266 var imgURL = <b>chrome.extension.getURL("images/myimage.png")</b>; | 266 var imgURL = <b>chrome.extension.getURL("images/myimage.png")</b>; |
| 267 document.getElementById("someImage").src = imgURL; | 267 document.getElementById("someImage").src = imgURL; |
| 268 </pre> | 268 </pre> |
| OLD | NEW |