Add a new MV3 sample demonstrating the chrome.commands API.
The sample registers custom keyboard shortcuts in the manifest,
handles command events in the service worker with notifications
and badge text feedback, and uses chrome.commands.getAll() in the
popup to display all registered shortcuts.
Closes#1126
Updates the Puppeteer tutorial to use the `action.openPopup()`
method to open the popup, and then `asPage()` to access the popup
as a page target.
A basic service worker has been added to the history sample to
give us a context to call `action.openPopup()` in.
We were using the wrong key when importing settings from a file.
Additionally, added a reload to fix an issue where the UI was not
updated when new settings were imported.
Fixes#1519
* Partial fixes for sample list generator
A number of fixes for the sample list generator:
- Removes a comment from one of our manifest files, as we don't
currently support JSONC.
- Ignores the `node_modules` folder since we have recently added some AI
samples with a build step.
- Adds the `aiOriginTrial` API to the list of recognised APIs.
- Updates `extension-apis.json` with the latest data from the
`chrome-types` package.
Updating recognised extension APIs still requires access to a
non-existent storage bucket, so this does not fully fix the process.
* Fix linter issue
* Add getProfileUserInfo example to sample identity extension
* Clarify UI
* Run prettier
---------
Co-authored-by: Oliver Dunk <oliverdunk@google.com>
* Initial copy of _archive/apps/samples/identity
* Modify to run be an extension rather than a Chrome App.
* Update extension to manifest v3
* Update README
* Remove references to chrome://identity-internals
* Use Promises rather than callbacks
See https://developer.chrome.com/docs/extensions/develop/migrate/api-calls#replace-callbacks
* Apply code-review markups.
* Apply more code-review markups
* Format with prettier
* Use Promise.catch instead of runtime.lastError
* Update screenshot
---------
Co-authored-by: Oliver Dunk <oliverdunk@google.com>
* Update chrome.privacy API sample
Updates the API sample for chrome.privacy to avoid using the
deprecated autofillEnabled property and to behave in a way which
is more useful. In particular, you can now easily toggle the
setting by clicking the extension icon.
See https://issuetracker.google.com/issues/311072505 for more
context.
* Update api-samples/privacy/README.md
Co-authored-by: Joe Medley <jmedley@google.com>
---------
Co-authored-by: Joe Medley <jmedley@google.com>
Updates a nunber of dependencies in a single PR. These were
suggested by dependabot but updating them individually would
mean the reposistory would be in a broken state until everything
had merged.
I'm not personally a huge fan of lowercasing doctype, but
Prettier has taken an opinionated stance here and there is not a
way to disable it:
https://github.com/prettier/prettier/issues/15096
* migrate to mv3
* migrated download links to mv3
* Revert "migrated download links to mv3"
This reverts commit 70e4512277.
* restored the old mv2 manifest
* Address feedback
* Update installation location on macOS
We need to use specific folders otherwise Chrome/Python doesn't
have permission to execute the file.
* Fix linting errors
* Rename app directory to extension
* Use updated README template
* Update uninstall script
---------
Co-authored-by: Oliver Dunk <oliverdunk@google.com>
In the sandbox/sandbox example, a variable `result` is created as a const, but it's attempted to be reassigned later in the code. This changeset just changes the `result` variable to be a reassignable variable instead.
* Add roll printing sample
* Copied heavily from existing printing sample
* Changed functionality from existing printing sample as follows:
* Only display printers that support roll printing
* In table, create a row for each unique width for each printer
* Fix wording in README
* Update readme to list a milestone for bug to get fixed
* Update api-samples/printing/roll-printing/README.md
Co-authored-by: Joe Medley <jmedley@google.com>
* Update api-samples/printing/README.md
Co-authored-by: Joe Medley <jmedley@google.com>
* Convert a function call to a promise.
* Clean up a few errors setting element IDs.
Remove the main cancel button that is no longer used. Instead, the
cancel button that gets created in the print job table is the one that
should be used.
* Consolidate the roll-printing sample with the regular sample
There is now a checkbox on the main UI to select roll printers or all
printers. For roll printing, this sample now demonstrates how to check
if the printer is capable of roll printing, if the printer is capable of
trimming the paper after printing, and how the media length can be a
variable value.
* Update api-samples/printing/README.md
Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>
* Update api-samples/printing/printers.js
Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>
* Simplify fuction to use find instead of filter
Update README to link to roll printing info.
* Use new page instead of popup
* Update api-samples/printing/README.md
Co-authored-by: Joe Medley <jmedley@google.com>
---------
Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>