From 92d9dd518e6e9dbfb96a20c232e569dcd99a7ea2 Mon Sep 17 00:00:00 2001 From: Ian Stanion Date: Fri, 30 Jun 2023 07:43:39 -0400 Subject: [PATCH] Adds readme files for every mv3 sample --- api-samples/action/{action.md => README.md} | 0 api-samples/alarms/README.md | 14 ++++++++++++++ .../{contentSettings.md => README.md} | 0 .../contextMenus/global_context_search/README.md | 15 +++++++++++++++ api-samples/cookies/cookie-clearer/README.md | 14 ++++++++++++++ api-samples/default_command_override/README.md | 13 +++++++++++++ .../{inspectedWindow.md => README.md} | 0 api-samples/favicon/README.md | 14 ++++++++++++++ .../{fontSettings.md => README.md} | 0 .../fontSettings/fontSettings Basic/README.md | 14 ++++++++++++++ .../showHistory/{show-history.md => README.md} | 0 api-samples/il8n/README.md | 14 ++++++++++++++ api-samples/omnibox/new-tab-search/README.md | 13 +++++++++++++ api-samples/override/blank_ntp/README.md | 13 +++++++++++++ .../{sandboxed-content.md => README.md} | 0 .../http-auth/{http-auth.md => README.md} | 0 16 files changed, 124 insertions(+) rename api-samples/action/{action.md => README.md} (100%) create mode 100644 api-samples/alarms/README.md rename api-samples/contentSettings/{contentSettings.md => README.md} (100%) create mode 100644 api-samples/contextMenus/global_context_search/README.md create mode 100644 api-samples/cookies/cookie-clearer/README.md create mode 100644 api-samples/default_command_override/README.md rename api-samples/devtools/inspectedWindow/{inspectedWindow.md => README.md} (100%) create mode 100644 api-samples/favicon/README.md rename api-samples/fontSettings/fontSettings Advanced/{fontSettings.md => README.md} (100%) create mode 100644 api-samples/fontSettings/fontSettings Basic/README.md rename api-samples/history/showHistory/{show-history.md => README.md} (100%) create mode 100644 api-samples/il8n/README.md create mode 100644 api-samples/omnibox/new-tab-search/README.md create mode 100644 api-samples/override/blank_ntp/README.md rename api-samples/sandbox/sandboxed-content/{sandboxed-content.md => README.md} (100%) rename api-samples/webRequest/http-auth/{http-auth.md => README.md} (100%) diff --git a/api-samples/action/action.md b/api-samples/action/README.md similarity index 100% rename from api-samples/action/action.md rename to api-samples/action/README.md diff --git a/api-samples/alarms/README.md b/api-samples/alarms/README.md new file mode 100644 index 0000000000..b6468e7b5c --- /dev/null +++ b/api-samples/alarms/README.md @@ -0,0 +1,14 @@ +# chrome.browsingData + +This sample demonstrates using the `chrome.alarms` API to allow the user to set alarms using an extension page. + +## Overview + +The extension uses `chrome.alarms.create()` to set an initial alarm that is displated 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. diff --git a/api-samples/contentSettings/contentSettings.md b/api-samples/contentSettings/README.md similarity index 100% rename from api-samples/contentSettings/contentSettings.md rename to api-samples/contentSettings/README.md diff --git a/api-samples/contextMenus/global_context_search/README.md b/api-samples/contextMenus/global_context_search/README.md new file mode 100644 index 0000000000..94d3a477d3 --- /dev/null +++ b/api-samples/contextMenus/global_context_search/README.md @@ -0,0 +1,15 @@ +# chrome.contextMenus + +This sample demonstrates using the `chrome.contextMenus` API to let 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. diff --git a/api-samples/cookies/cookie-clearer/README.md b/api-samples/cookies/cookie-clearer/README.md new file mode 100644 index 0000000000..db3d236e90 --- /dev/null +++ b/api-samples/cookies/cookie-clearer/README.md @@ -0,0 +1,14 @@ +# chrome.cookies + +This sample demonstrates using the `chrome.cookies` API to let 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. diff --git a/api-samples/default_command_override/README.md b/api-samples/default_command_override/README.md new file mode 100644 index 0000000000..2d4ec81776 --- /dev/null +++ b/api-samples/default_command_override/README.md @@ -0,0 +1,13 @@ +# chrome.cookies + +This sample demonstrates using the `chrome.commands` API to create 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. diff --git a/api-samples/devtools/inspectedWindow/inspectedWindow.md b/api-samples/devtools/inspectedWindow/README.md similarity index 100% rename from api-samples/devtools/inspectedWindow/inspectedWindow.md rename to api-samples/devtools/inspectedWindow/README.md diff --git a/api-samples/favicon/README.md b/api-samples/favicon/README.md new file mode 100644 index 0000000000..7f7b21358c --- /dev/null +++ b/api-samples/favicon/README.md @@ -0,0 +1,14 @@ +# favicon + +This sample demonstrates using the favicon manifest permission to display the favicon of a url in the extension popup. + +## Overview + +The extension uses `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. diff --git a/api-samples/fontSettings/fontSettings Advanced/fontSettings.md b/api-samples/fontSettings/fontSettings Advanced/README.md similarity index 100% rename from api-samples/fontSettings/fontSettings Advanced/fontSettings.md rename to api-samples/fontSettings/fontSettings Advanced/README.md diff --git a/api-samples/fontSettings/fontSettings Basic/README.md b/api-samples/fontSettings/fontSettings Basic/README.md new file mode 100644 index 0000000000..999925af2a --- /dev/null +++ b/api-samples/fontSettings/fontSettings Basic/README.md @@ -0,0 +1,14 @@ +# chrome.fontSettings + +Demonstrates the `chrome.fontSettings` API by allowing users to modify the styling displayed fonts on webpages. + +## Overview + +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. diff --git a/api-samples/history/showHistory/show-history.md b/api-samples/history/showHistory/README.md similarity index 100% rename from api-samples/history/showHistory/show-history.md rename to api-samples/history/showHistory/README.md diff --git a/api-samples/il8n/README.md b/api-samples/il8n/README.md new file mode 100644 index 0000000000..4b5d0734e5 --- /dev/null +++ b/api-samples/il8n/README.md @@ -0,0 +1,14 @@ +# chrome.i18n + +This sample demonstrates using the `chrome.i18n` API localize text in the extension popup. + +## Overview + +The extension includes localized translations of its UI text in the \_locales folder. It then uses `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. diff --git a/api-samples/omnibox/new-tab-search/README.md b/api-samples/omnibox/new-tab-search/README.md new file mode 100644 index 0000000000..7af8d56137 --- /dev/null +++ b/api-samples/omnibox/new-tab-search/README.md @@ -0,0 +1,13 @@ +# chrome.omnibox + +This sample demonstrates using the `"omnibox"` manifest key and API to create a keyword that opens up a browser search in a new tab. + +## Overview + +The extension uses `"omnibox"` manifest key and its parameter `"keyword"`. When `chrome.omnibox.onInputEntered.addListener()` is triggered and the keyword 'nt' 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 'nt' and some text you wish to google within the browser omnibox. diff --git a/api-samples/override/blank_ntp/README.md b/api-samples/override/blank_ntp/README.md new file mode 100644 index 0000000000..de6577c2d0 --- /dev/null +++ b/api-samples/override/blank_ntp/README.md @@ -0,0 +1,13 @@ +# "chrome_url_overrides" + +This sample demonstrates using the ` "chrome_url_overrides"` manifest key to replace the user's default New Tab page with a new html file. + +## Overview + +The extension uses ` "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. diff --git a/api-samples/sandbox/sandboxed-content/sandboxed-content.md b/api-samples/sandbox/sandboxed-content/README.md similarity index 100% rename from api-samples/sandbox/sandboxed-content/sandboxed-content.md rename to api-samples/sandbox/sandboxed-content/README.md diff --git a/api-samples/webRequest/http-auth/http-auth.md b/api-samples/webRequest/http-auth/README.md similarity index 100% rename from api-samples/webRequest/http-auth/http-auth.md rename to api-samples/webRequest/http-auth/README.md