WebExtensions: Difference between revisions

remove those headers again
("WebExtensions add-on" -> "WebExtension")
(remove those headers again)
Line 27: Line 27:
This directory contains two files: <code>manifest.json</code> and <code>borderify.js</code>.
This directory contains two files: <code>manifest.json</code> and <code>borderify.js</code>.


====manifest.json====
Every WebExtension must contain a <code>manifest.json</code> file. This one looks like:
Every WebExtension must contain a <code>manifest.json</code> file. This one looks like:


Line 55: Line 54:
* The next key, <code>"content_scripts"</code>, specifies a [https://developer.chrome.com/extensions/match_patterns match-pattern] and a [https://developer.chrome.com/extensions/content_scripts content script] to run in matching pages. In this case the pattern matches any pages under <code>mozilla.org</code>, or any of its subdomains. The content script is <code>"borderify.js"</code>.
* The next key, <code>"content_scripts"</code>, specifies a [https://developer.chrome.com/extensions/match_patterns match-pattern] and a [https://developer.chrome.com/extensions/content_scripts content script] to run in matching pages. In this case the pattern matches any pages under <code>mozilla.org</code>, or any of its subdomains. The content script is <code>"borderify.js"</code>.


====borderify.js====
The other file is <code>borderify.js</code> itself, which just draws a red border around the document body:
The other file is <code>borderify.js</code> itself, which just draws a red border around the document body:


canmove, Confirmed users
737

edits