Add code for simple Firefox extension

This commit is contained in:
James Skemp 2023-12-09 16:44:01 -06:00
commit 9d78a48338
4 changed files with 26 additions and 0 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Firefox: First Extension Tutorial (Borderify)
Following Mozilla's [Your first extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension).
## Install
Navigate to ```about:debugging```, select This Firefox, Load Temporary Add-on, and select any file in this directory.
Now navigate to any mozilla.org page, like https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension

1
borderify.js Normal file
View File

@ -0,0 +1 @@
document.body.style.border = "5px solid red";

BIN
icons/border-48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

18
manifest.json Normal file
View File

@ -0,0 +1,18 @@
{
"manifest_version": 2,
"name": "Borderify",
"version": "1.0",
"description": "Adds a red border to all webpages matching mozilla.org.",
"icons": {
"48": "icons/border-48.png"
},
"content_scripts": [
{
"matches": ["*://*.mozilla.org/*"],
"js": ["borderify.js"]
}
]
}