Commit Graph

498 Commits

Author SHA1 Message Date
rebloor
709bc28a6c Reverse var to let change (#541)
* Reverse var to let change

* Review feedback

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

---------

Co-authored-by: Rob Wu <rob@robwu.nl>
2023-10-02 13:46:01 +13:00
David D Lowe
6392240f0f Use async/await in options.js (#457)
Co-authored-by: rebloor <git@sherpa.co.nz>
2023-09-06 11:24:59 +12:00
rebloor
a468a4c8b3 Delete build directory (#539)
Fixes #397

There is no mechanism for updating these files. They were last refreshed five years ago, so can no longer be guaranteed to reflect the example code. Links to these files on MDN were removed in https://github.com/mdn/content/pull/28422.
2023-08-28 04:54:46 +12:00
sn02
eb2311c181 Update manifest.json (#447)
Co-authored-by: rebloor <git@sherpa.co.nz>
2023-08-10 21:23:17 +12:00
Daniel Nixon
8b40ee549c Improve accessibility (#418) 2023-08-10 16:33:08 +12:00
Daniel Nixon
017fb25625 Improve accessibility (#417)
https://www.w3.org/TR/WCAG20-TECHS/H44.html

Co-authored-by: rebloor <git@sherpa.co.nz>
2023-08-10 16:28:17 +12:00
guest271314
ff1cd273e0 Substitute about:debugging#/runtime/this-firefox for about:debugging (#488)
* Substitute about:debugging#/runtime/this-firefox for about:debugging

Extensions are loaded at about:debugging#/runtime/this-firefox not about:debugging

* Drop Python 2 support. Fixes #489

* Update README.md

* Revert to ae1c2176ea

* Update native-messaging/README.md

Co-authored-by: rebloor <git@sherpa.co.nz>

---------

Co-authored-by: rebloor <git@sherpa.co.nz>
2023-06-15 14:47:36 +12:00
Rob Wu
f4a611d76b Add index of all DNR examples to all DNR examples (#527) 2023-05-17 22:25:37 +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
Pedro Celeste
9433f842d6 Code now reflects newer versions of browser.menus API (#523)
* Extension now is up-to-date with the Menus API

In the previous version of this extension, the author used a comment to
explain that the `browser.menus.onClicked.addListener` event listener
doesn't pass the current check state of a checkbox menu.

To solve this, an additional variable checkedState was used to keep
track of the current value of the context menu.

But now, this function is supported by the menus API in Firefox.

I changed the code to reflect how you would use it with the recent
versions, making it easier for new developers to learn this
functionality.

* Comment now reflects new function body
2023-04-21 14:14:58 +12:00
Aram Panasenco
a2da599980 Make background script of context-menu-copy-link-with-types non-persistent? (#501)
* Made background script of context-menu-copy-link-with-types non-persistent. Now clearing errors that could result from background.js context menu creation happening more than once.

* Suggestions from code review

* Syntax error and formatting

* Added note about () => void browser.runtime.lastError

* Feedback suggestion

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

---------

Co-authored-by: rebloor <git@sherpa.co.nz>
Co-authored-by: Rob Wu <rob@robwu.nl>
2023-03-19 05:20:33 +13:00
Carlos Mañas
0d9c6623fb Use const instead of let (#520) 2023-03-17 12:19:01 +01:00
guest271314
c982b6b4af Eliminate space counted as message length (#510) 2023-01-13 16:27:50 +01:00
Brian Thomas Smith
48bae1f4c2 Merge pull request #508 from mdn/add-template-docs
Add shared workflows
2023-01-03 15:46:08 +01:00
Brian Thomas Smith
71ed91ff24 chore(tooling): reset Prettier config to allow the project to define settings 2023-01-03 15:02:26 +01:00
Brian Thomas Smith
2bb5e55e14 chore(docs): Fix templates 2023-01-03 13:52:18 +01:00
Brian Thomas Smith
83764b3002 chore(docs): Fix templates 2023-01-03 13:45:04 +01:00
Brian Thomas Smith
83fa8830f0 Delete config.yml
This is not needed in the current welcome bot -> https://github.com/mdn/workflows/blob/main/.github/workflows/allo-allo.yml
2023-01-03 10:39:03 +01:00
Brian Thomas Smith
f8350be31b Update welcome-bot.yml
Update placeholder with target repo name
2022-12-27 14:44:58 +01:00
Brian Thomas Smith
461f4a4aa1 Add editorconfig and Prettier config 2022-12-22 14:05:46 +01:00
Brian Thomas Smith
fb51e5d0a2 Add shared workflows 2022-12-22 14:03:21 +01:00
rebloor
4e83c4d4b6 Update reference to applications key
Replaced references to applications key with browser_specific_settings
2022-12-16 12:21:45 +13:00
Talal
a8c3fcf80d Fix beastify code (#505)
* Fix blank page bug when clicking popup background
2022-12-13 21:00:24 +01:00
Eike Mücksch
6d8f07243a Don't use <div /> as a button (#502)
* Don't use <div /> as a button

Addition to https://github.com/mdn/content/pull/21410

* stick to old styling

* Update beastify/popup/choose_beast.html

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

* Update beastify/popup/choose_beast.css

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

* fix: check for button type at event listener

* fix: align css selectors to changes

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
2022-11-24 15:07:49 +13:00
Aram Panasenco
0260139efe Updated webpack to a more recent version due to security vulnerabilities in old version. (#500) 2022-10-13 11:52:47 +13:00
rebloor
82217a05bc Replace var with let in examples (#484)
* Replace var with let in examples

store-collected-images/webextension-plain/deps/uuidv4.js

* Reverted third–party code
2022-08-11 04:27:28 +12:00
Rob Wu
1c0a24b2a6 Merge pull request #494 from interysy/master
Changed to runtime for beastify extension when getting content url
2022-06-13 02:51:21 +02:00
Michal Wozniak
a4936f5215 Undone whitespace 2022-06-13 00:04:50 +01:00
Michal Wozniak
8c98d1a05b Changed to runtime for beastify extension when getting content url 2022-06-11 23:14:27 +01:00
Rob Wu
6452f29990 Merge pull request #493 from sayanarijit/patch-1
Minor fix in commands extension
2022-05-22 14:51:18 +02:00
Arijit Basu
dfa9e51383 Minor fix in commands extension 2022-05-22 18:10:32 +05:30
Rob Wu
69ae7494bb Merge pull request #483 from aduntong/master
Update examples.json
2022-03-08 13:00:08 +01:00
Adun Tong
73c304df5a Update examples.json
Fix typo
2022-03-08 18:06:58 +08:00
Ruth John
a545cdcd69 Fixing space
Means https://github.com/mdn/content/pull/8644 can be merged
2021-10-11 16:28:46 +01:00
Caitlin Neiman
da3202c242 Merge pull request #466 from cleentfaar/patch-1
Fixed missing closing tag
2021-09-07 11:41:23 -07:00
Caitlin Neiman
847671c721 Merge pull request #477 from mdn/update-contact-info
Update CONTRIBUTING and README docs
2021-09-07 11:40:45 -07:00
caitmuenster
ac5bae7440 Update CONTRIBUTING and README docs 2021-09-07 11:38:57 -07:00
Caitlin Neiman
2adebcc0e5 Merge pull request #476 from mdn/coc-update
Updates Code of Conduct
2021-09-07 11:27:17 -07:00
caitmuenster
744a5040c0 Updates Code of Conduct. 2021-09-07 11:26:00 -07:00
Anil Seervi
753b6fc6d0 Update maximun zoomFactor for tabs (#472) 2021-09-01 04:05:04 +12:00
Rob Wu
0d0ae41da1 Merge pull request #471 from siimpragi/patch-1
Fix typo
2021-07-24 01:41:29 +02:00
Siim Pragi
2733b3ed16 Fix typo 2021-07-24 01:53:09 +03:00
Rob Wu
f765750678 Merge pull request #469 from cwaldren/cwaldren-update-native-messaging
Update documentation of native-messaging example
2021-05-26 11:24:46 +02:00
Casey Waldren
ac32b7c5fd Update documentation of native-messaging example
Instructs user to view console output via "Inspect" button on extensions page, since there was no output using the previous instructions.

Additionally, updates expected output.
2021-05-25 20:11:38 -07:00
Rob Wu
1e984e6f21 Merge pull request #463 from madnificent/feature/use-url-interface-in-apply-css-example
Use URL interface in apply-css example
2021-02-06 17:57:14 +01:00
Cas
c34c015212 Fixed missing closing tag 2021-01-25 17:01:04 +01:00
Aad Versteden
b1b896627a Add doc that received url parameter must be a valid URL
The `new URL(url)` statement will throw an error if the supplied
string is not a valid URL.  Adding a note to the function to clarify
that as requested by @Rob--W.
2020-12-31 13:31:56 +01:00
Aad Versteden
4cddd8497c Use URL interface in apply-css example
By using the URL interface, the user is ascertained that the piece of
code does not manipulate the DOM.  Keeping them in the right mental
context for the example.

The apply-css example uses the protocol of the URL of the tab to
determine if a pageAction should be shown.  Any page that is hosted
over http or https will receive the page action.

The former implementation creates an anchor tag, assigns the URL to
that, and fetches the protocol from there.  This PR alters that to
using the URL interface.  This makes it clear to the user that we're
staying in JavaScript land and will not start manipulating the visible
DOM.  I would argue this is cleaner all together, but I'm very open to
learning about a different opinion.

The URL interface is more broadly supported than the
pageAction.setIcon which this example is also dependent on, so this
change should not change compatibility of this Browser Extension.
2020-12-31 10:36:57 +01:00
Caitlin Neiman
2184fee75a Merge pull request #425 from nchevobbe/devtools-inspector-toolbar
Adds an example for devtools inspector sidebar
2020-11-12 10:01:11 -08:00
Trishul
60ce50b10e adding example of protocol_handlers (#451)
Thanks @tsl143  all looking good.
2020-05-28 14:35:14 +12:00