mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-26 13:19:49 +07:00
Adds readme files for every mv3 sample (#973)
* Adds readme files for every mv3 sample * Update api-samples/alarms/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/alarms/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/override/blank_ntp/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/omnibox/new-tab-search/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/omnibox/new-tab-search/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/contextMenus/global_context_search/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/cookies/cookie-clearer/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/default_command_override/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/il8n/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/il8n/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/default_command_override/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/favicon/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/favicon/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/override/blank_ntp/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/fontSettings/fontSettings Basic/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update README.md * Update api-samples/fontSettings/fontSettings Basic/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Updates omnibox sample with small clarity improvement --------- Co-authored-by: Joe Medley <jmedley@google.com>
This commit is contained in:
committed by
GitHub
parent
307da41987
commit
05b8106ce5
14
api-samples/alarms/README.md
Normal file
14
api-samples/alarms/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# chrome.browsingData
|
||||
|
||||
This sample demonstrates the `chrome.alarms` API by allowing the user to set alarms using an extension page.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension calls `chrome.alarms.create()` to set an initial alarm that is displayed on the extension page. More alarms can be set with user input.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Pin the extension to the taskbar to access the action button.
|
||||
4. Open the extension popup by clicking the action button and interact with the UI.
|
||||
15
api-samples/contextMenus/global_context_search/README.md
Normal file
15
api-samples/contextMenus/global_context_search/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# chrome.contextMenus
|
||||
|
||||
This sample demonstrates the `chrome.contextMenus` API by letting a user switch between searching different countries' versions of Google via a `contextMenu`.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension uses `chrome.contextMenus.create()` to populate the context menu with locale options based on an options menu in the popup. A `chrome.contextMenus.onClicked.addListener()` event will open a specific locale's Google homepage when one of the extension's context menu options are clicked.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Pin the extension to the taskbar to access the action button.
|
||||
4. Open the extension popup by clicking the action button and interact with the UI.
|
||||
5. Right click within the browser to view and interact with the context menu.
|
||||
14
api-samples/cookies/cookie-clearer/README.md
Normal file
14
api-samples/cookies/cookie-clearer/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# chrome.cookies
|
||||
|
||||
This sample demonstrates the `chrome.cookies` API by letting a user delete their cookies via a popup UI.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension uses `chrome.cookies.getAll()` and `chrome.cookies.remove()` to delete the user's cookies when prompted.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Pin the extension to the taskbar to access the action button.
|
||||
4. Open the extension popup by clicking the action button and interact with the UI.
|
||||
13
api-samples/default_command_override/README.md
Normal file
13
api-samples/default_command_override/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# chrome.cookies
|
||||
|
||||
This sample demonstrates the `chrome.commands` API by creating a new keyboard macro for switching tabs in the browser window.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension sets Ctrl+Shift+Left and Ctrl+Shift+Right as command inputs in the manifest, and uses `chrome.commands.onCommand.addListener()` to trigger switching tabs.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Input the keyboard commands to switch between tabs.
|
||||
14
api-samples/favicon/README.md
Normal file
14
api-samples/favicon/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# favicon
|
||||
|
||||
This sample demonstrates the favicon manifest permission by displaying the favicon of a url in the extension popup.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension calls `chrome.runtime.getURL('/_favicon/')` to create a fully-qualified URL pointing to the "\_favicon/" folder. Then it returns a new string representing the URL with several query parameters. Finally, the extension appends the image to the body of the extension popup.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Pin the extension to the taskbar to access the action button.
|
||||
4. Open the extension popup by clicking the action button.
|
||||
14
api-samples/fontSettings/fontSettings Basic/README.md
Normal file
14
api-samples/fontSettings/fontSettings Basic/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# chrome.fontSettings
|
||||
|
||||
This extension demonstrates the `chrome.fontSettings` API by allowing users to modify the size of fonts on webpages.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension creates a user interface in the extension's options page that allows users to see and modify font settings using `chrome.fontSettings` to change parameters.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Pin th extension to the taskbar and click the action button.
|
||||
4. Click the extension's action button to visit the popup page.
|
||||
14
api-samples/il8n/README.md
Normal file
14
api-samples/il8n/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# chrome.i18n
|
||||
|
||||
This sample demonstrates the `chrome.i18n` API by localizing text in the extension popup.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension includes localized translations of its UI text in the `\_locales\' folder. It then calls `chrome.i18n.getMessage()` to populate the text in the extension UI with either French or English, depending on the current language setting.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Pin the extension to the taskbar to access the action button.
|
||||
4. Open the extension popup by clicking the action button.
|
||||
13
api-samples/omnibox/new-tab-search/README.md
Normal file
13
api-samples/omnibox/new-tab-search/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# chrome.omnibox
|
||||
|
||||
This sample demonstrates the `"omnibox"` manifest key and API by creating a keyword that opens up a browser search in a new tab.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension uses the `"omnibox"` manifest key and its parameter `"keyword"`. When `chrome.omnibox.onInputEntered.addListener()` is called and the keyword 'newTab' is used, a new tab is opened with a google search for the user's input text.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Type 'newTab' and some text you wish to google within the browser omnibox.
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "Omnibox - New Tab Search",
|
||||
"description": "Type 'nt' plus a search term into the Omnibox to open search in new tab.",
|
||||
"description": "Type 'newTab' plus a search term into the Omnibox to open search in new tab.",
|
||||
"version": "1.0",
|
||||
"manifest_version": 3,
|
||||
"background": {
|
||||
"service_worker": "background.js"
|
||||
},
|
||||
"omnibox": { "keyword": "nt" },
|
||||
"omnibox": { "keyword": "newTab" },
|
||||
"action": {
|
||||
"default_icon": {
|
||||
"16": "newtab_search16.png",
|
||||
|
||||
13
api-samples/override/blank_ntp/README.md
Normal file
13
api-samples/override/blank_ntp/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# "chrome_url_overrides"
|
||||
|
||||
This sample demonstrates the ` "chrome_url_overrides"` manifest key by replacing the user's default New Tab page with a new html file.
|
||||
|
||||
## Overview
|
||||
|
||||
The extension calls ` "chrome_url_overrides"` and its parameter `"newtab"` to replace the New Tab page with blank.html.
|
||||
|
||||
## Running this extension
|
||||
|
||||
1. Clone this repository.
|
||||
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
|
||||
3. Open a new tab while the extension is enabled.
|
||||
Reference in New Issue
Block a user