49 Commits

Author SHA1 Message Date
rebloor
f4d0193956 Bug-2001318 example showing SVG icon reacting to theme (#620)
* Bug-2001318 example showing SVG icon reacting to theme

* Updates for feedback
2026-03-12 04:42:31 +13:00
rebloor
e1253d9ad3 MDN get started tutorial examples to manifest V3 (#608)
* MDN get started tutorial examples to manifest V3

* Migrate to Scripting API

* Updated to readmes and code comments

* Apply suggestions to readmes from review

Co-authored-by: Simeon Vincent <svincent@gmail.com>

* Convert choose_beast.js to async

* Apply suggestions from review

Co-authored-by: Simeon Vincent <svincent@gmail.com>

* Updated illustrated API list for beastify

* Apply suggestions from review

Co-authored-by: Rob Wu <rob@robwu.nl>

---------

Co-authored-by: Simeon Vincent <svincent@gmail.com>
Co-authored-by: Rob Wu <rob@robwu.nl>
2026-01-28 07:15:58 +13:00
Joshua Chen
ce292cbd30 Replace Markdown formatting with HTML (#580) 2025-04-05 01:19:36 +02:00
Rob Wu
8f42801287 Correct userScripts / userScripts_legacy index (#579)
The MV2-specific userScripts example is currently associated with the
"userScripts.register" API. While this is the correct API name, the
MDN documentation is actually at `userScripts_legacy/register`.

To make sure that the example is rendered in the right location,
change "userScripts" to "userScripts_legacy".

... and for completeness also add `runtime.onMessage` to the MV3
example, since that example uses this API.
2025-03-09 20:05:51 +01:00
Rob Wu
d1116e32e9 Add example using MV3 userScripts API (#576) 2025-02-24 12:13:40 +13:00
Florian Dieminger
cc4236edfb fix(examples.json): remove &#x200B;
There are two &#x200B; (zero width space) in the
examples.json
2024-08-12 10:05:28 +02:00
Rob Wu
06330a69c2 Add declarativeNetRequest (DNR) + MV3 examples (#526)
These examples are designed to be cross-browser compatible.
In particular, these extensions do not use `background` because there is
currently no single manifest that can support both Firefox and Chrome,
due to the lack of event page support in Chrome, and the lack of service
worker support in Firefox.

Three examples demonstrating the use of the declarativeNetRequest API:
- dnr-block-only: One minimal example demonstrating the use of static
  DNR rules to block requests.
- dnr-redirect-url: One minimal example demonstrating the use of static
  DNR rules to redirect requests.
- dnr-dynamic-with-options: A generic example demonstrating how host
  permissions can be requested and free forms to input DNR rules.
2023-05-17 18:13:55 +02:00
Adun Tong
73c304df5a Update examples.json
Fix typo
2022-03-08 18:06:58 +08:00
Siim Pragi
2733b3ed16 Fix typo 2021-07-24 01:53:09 +03:00
Trishul
60ce50b10e adding example of protocol_handlers (#451)
Thanks @tsl143  all looking good.
2020-05-28 14:35:14 +12:00
rebloor
0d46482e7d Remove retired theme aliases (#430)
* Remove required theme aliases

Replaced uses of headerURL, accentcolor, and textcolor with theme_frame, frame, and tab_background_text. Tested and confirmed all extensions working as expected.

* Fixed another reference to headerURL

Co-authored-by: Richard Bloor <rbloor@atlassian.com>
2020-03-23 17:00:00 -07:00
rebloor
177f603557 New user script example (#438)
* New user script example

This PR is the content from [PR 426](https://github.com/mdn/webextensions-examples/pull/426), originally submitted by Irene, addressing the feedback on the readme content.

* Including the following changes:
* renaming the content script example and updating the readme file to reference the user script example
* renaming the user script example and versioning as v1
* addressing feedback on the user script example: limiting input to hosts and script, addressing code and HTML/CSS comments

I haven't changed the "eating" script example, I feel it is useful to have similar demonstrations in the content and user script examples to make it easier for developers to compare and contrast.

* Various changes for feedback

* Added a user script ID that is stored in the registered script's metadata and then used in the API script to key the data stored in local storage

* Update to emphasize scoping of local storage using an ID provided in the user script metadata

Co-authored-by: Richard Bloor <rbloor@atlassian.com>
2020-03-19 08:43:36 -07:00
rebloor
72dfcf1bad proxy-blocker updates (#422)
* proxy-blocker updates

These changes replace the use of the deprecated `proxy.register` (PAC file) with `proxy.onRequest` to handle the proxying of requests.

* Changes as per feedback

* Fixed typo

* Addressed feedback relating to issue with variable initialization after enable/disable

* Typo fix

* The changes as suggested by @wbamberg
2019-09-04 11:28:46 -07:00
Richard Bloor
7fb7b73a28 Additional documentation of the use of tabs.tab in various examples 2019-07-22 05:19:46 +12:00
Irene Smith
88b645e3ec Merge pull request #408 from rebloor/examples_json_catch_up
Additions to the list of examples
2019-06-24 06:07:17 -04:00
Richard Bloor
66b7122ae9 Additional information about the use of properties and types in examples 2019-04-19 05:44:37 +12:00
Richard Bloor
eb6e5a2e23 Details of the latest additions to the list of examples and adding missing example descriptions. 2019-03-25 20:26:17 +13:00
Richard Bloor
b0e8ec6993 This change is to remove the 3 embedded web extension examples. The technology to support these examples was removed from Firefox in November 2017, with the release of Firefox 57. 2019-03-21 12:22:23 +13:00
Will Bamberg
7754b33c14 Remove react example 2019-01-07 13:59:48 -08:00
Will Bamberg
c11a9dd78d Update examples.json 2018-03-22 15:05:57 -07:00
Will Bamberg
395210c046 update examples.json 2018-03-02 14:58:51 -08:00
Will Bamberg
416199ccf9 Update examples.json 2018-01-09 16:26:02 -08:00
Nikita
6122bf9c9d 138 line - typo: engnie -> engine (#320) 2017-12-04 08:02:11 -08:00
wbamberg
dabfe5c721 Update examples.json, remove index from README (#301) 2017-10-25 13:26:21 -07:00
Yassine Chaouche
f635b67a20 update examples.json (#291)
Add browserAction.setTitle in the javascript_api list of the bookmark-it example.
2017-10-02 08:17:20 -07:00
wbamberg
8daa8b29c2 Update examples.json for contextMenus->menus change (#282) 2017-09-08 16:12:19 -07:00
wbamberg
179836d794 Update context-menu-demo (#272)
* Update context-menu-demo

* Some cleanup, and note from cross-browser compat
2017-09-08 16:07:36 -07:00
Maxim Zalata
d7bf874833 change shortcut to Ctrl+Shift+U for commands example (#264) 2017-08-17 15:16:33 -07:00
Phil Rukin
980168290f Update proxy-blocker extension to be compatible with firefox 56+ (#260)
* Update `proxy-blocker` extension to be compatible with firefox 56+

* Change `DIRECT 1234` to `DIRECT` see bug https://bugzilla.mozilla.org/show_bug.cgi?id=1355198
2017-08-11 05:48:55 -07:00
rebloor
f40d1785e2 Adding listing/descriptions for the imagify and themes examples. (#253)
There are a couple of queries about the item for themes:

* I was unclear whether to delete the javascript_apis key or use an empty list - I've used an empty list.
* The macros suggests it would be safe to use HTML formatting in the description, so I have done so to create the list of themes (rather than split them out individually)
2017-07-21 09:47:10 -07:00
Andrew Truong
119ee4cb6c webextension -> extension (#250)
naming convention update.
2017-07-17 15:30:48 -07:00
Will Bamberg
f744cd0022 Update examples.json 2017-06-15 11:48:46 -07:00
Will Bamberg
149b555962 Add proxy to examples.json 2017-05-29 14:59:56 -07:00
Onno Ekker
8ea3545b9d Fix typos in descriptions for examples.json (#219) 2017-05-15 09:48:21 -05:00
Will Bamberg
c7fb07a637 Updated examples.json 2017-02-21 16:30:14 -08:00
wbamberg
75903449f7 Update examples.json (#145)
* Update examples.json and simplify structure.
2016-11-18 16:19:42 -08:00
Andrew Terranova
07375ca50a Adds an Emoji Substitution example (#110)
* Adds an Emoji Substitution example

* Monitors DOM for additions after initial load

* Fixes typos

* Fixes substitution ordering bug

* <textarea> bug fix. Also removes confusion between Elements and Nodes.
2016-10-24 17:08:39 -07:00
Will Bamberg
d2a3254a6f Remove JSON description for inpage toolbar example, as that example has been removed 2016-08-30 16:36:08 -07:00
chrisdavidmills
a88ad30cdf adding onChange example code 2016-08-01 12:40:44 +01:00
chrisdavidmills
8285298a5d making small fix to examples.json 2016-08-01 11:45:03 +01:00
chrisdavidmills
00c563cee1 adding cookie example — cookie-bg-picker 2016-08-01 11:33:16 +01:00
wbamberg
08bb223a80 Added history-deleter to examples.json 2016-06-22 09:06:23 -07:00
Will Bamberg
2a5c590c4e Updated examples.json with context-menu-demo 2016-05-31 10:57:22 -07:00
Will Bamberg
8d056d0f5d fix a bug in the JSON, and add data for latest-download 2016-05-17 14:02:53 -07:00
Will Bamberg
c873e493bb add quicknote to examples.json 2016-04-20 08:42:11 -07:00
Will Bamberg
fda35f2e63 fix case in StorageArea 2016-04-19 21:21:01 -07:00
Will Bamberg
f8df8c1b4a added favourite-colour to examples.json 2016-04-19 20:54:48 -07:00
Will Bamberg
1421a741bb updated examples.json for commands examples 2016-04-19 20:42:24 -07:00
Will Bamberg
df875e0189 add JSON metadata file 2016-02-22 17:28:54 -08:00