Граф коммитов

1724 Коммитов

Автор SHA1 Сообщение Дата
Xuezhou Dai 45bbd8d68d
Update description fields for all samples (#994)
* Update `action` sample

* Update `alarms` sample

* Update `bookmarks` sample

* Update `browsingData` sample

* Update `contentSettings` sample

* Update `cookies/cookie-clearer` sample

* Update `debugger` sample

* Update wasm functional sample

* Update `functional/cookbook.geolocation-contentscript` sample

* Update `cookbook.geolocation-offscreen` sample

* Update `cookbook.geolocation-popup` sample

* Update `cookbook.offscreen-clipboard-write` sample

* Update `cookbook.offscreen-dom` sample

* Fix browsingData description

* Fix bookmarks description

* Update offscreen document descriptions

* Update descriptions

* Update browsingData description

* Update descriptions for all api samples

* Update descriptions for cookbook samples

* Update api-samples/browsingData/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/action/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/contextMenus/basic/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/cookies/cookie-clearer/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/debugger/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update functional-samples/sample.favicon-cs/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update functional-samples/cookbook.sidepanel-site-specific/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/omnibox/new-tab-search/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/devtools/inspectedWindow/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/override/blank_ntp/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Apply suggestions from code review

Co-authored-by: Joe Medley <jmedley@google.com>

* Update wasm samples description

* Update description

* Update functional-samples/sample.co2meter/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Apply suggestions from code review

---------

Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>
2023-08-17 18:19:42 +01:00
Joe Medley b6a3ac5501
Fix README typo (#992) 2023-08-04 11:53:23 -07:00
Xuezhou Dai 5addd58519
Add sample list generator action script (#989)
* Add action config

* Fix wrong working directory

* Fix relative path issue
2023-08-01 15:04:34 +01:00
Xuezhou Dai 9d9272809b
Add scripts for generating sample list (#963)
* init project

* init .gitignore

* Add main scripts

* Add prefetch script

* Add extension-apis.json

* Add README.md

* Update comments

* Add newline to .gitignore

* Update type definition

* Update extension api json loading.

* Update README.md

* Update deps

* Pin deps versions

* Update extension-apis.json

* Update prefetch script

* Update script

* Remove type definitions prefix

* Add comment to auto generated json

* Split utils

* Update types

* Add manifest utils

* refactor

* Reject if there is a babel error.

* Add parallel support

* Remove redundant import

* loadExtensionApis execute synchronously

* Add test deps

* Fix unexpected result

* Add test scripts

* Update type definition

* Add start function

* Rename api variable

* Fix test

* Update getApiType method

* Remove singularize

* Fix loadExtensionApis return signature

* Remove parallel controller

* Update type definition

* Add comments

* Update types

* Update api detector

* Fix api test

* Add more test cases

* Remove `$special` key

* Fix typo

* Simplify code

* Rename `apiType` to `type`

* Add warning if no api found

* Rename variable

* Update getFullMemberExpression

* Remove the special case for `chrome.storage`.

* Add getManifest function

* Revoke changes

* Fix crash caused by incorrect folder detection

* Remove redundant import

* Check property type with typedoc

* Add action

* Fix wrong node version

* Update code

* Rename variable

* Remove unnecessary Map

* Update README

* Fix typo

* Remove unnecessary output

* Add comments

* Remove the judgment on storage API.

* Update test case

* Update comments

* Extract `getAllJsFile()` into the filesystem util

* Explain how to run the tests in README

* Pin deps

* Extract variable

* Extract `isDirectory()` into the filesystem util

* Remove assertion

* Update the parameter of `extractApiCalls()`

* Update tests

* Remove action
2023-08-01 10:00:30 +01:00
amysteamdev 6f2e616494
[SidePanel API] Add sidePanel.open() cookbook (#983)
* Init commit

* Add sidepanel open cookbook

* Add minimum chrome version

* Add 116 on readme

* Add extension page
Add content script

* Tweak

* Tweak 2

* ¯\_(ツ)_/¯

* Update readme

* Update readme

* Change sample name in Readme

* Bold Chrome 116 for emphasis

* Typo fix
2023-07-18 10:36:40 -06:00
Xuezhou Dai a3966b4d92
Add readme files to existing samples & fix typos (#981)
* Add `Running this extension` section

* Change title

* Fix title typo

* Fix wrong operation

* Update `Running this extension` section

* Add `Running this extension` section
2023-07-17 10:05:43 -06:00
Matthew Molloy 9d93ff18e3
fix extension by renaming file (#984) 2023-07-17 10:04:33 -06:00
kyoyoung keum b6b19104fc
fix rename file in debugger example app (#985)
Co-authored-by: keumky2 <keumky2@woowahan.com>
2023-07-15 09:58:19 -04:00
Xuezhou Dai 50e377c44c
Add idle sample (#961)
* Add idle sample

* Fix typo

* Fix onStateChanged threshold

* Add README.md

* Update file structure

* Remove tabs permission

* Update api-samples/idle/README.md

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Update api-samples/idle/service-worker.js

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Update api-samples/idle/README.md

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Update api-samples/idle/README.md

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

---------

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>
2023-07-07 15:42:14 +01:00
Xuezhou Dai b4a018418d
historyOverride sample for mv3 (#945)
* Add historyOverride sample

* Remove action

* Add README.md

* Remove IIFE

* Update style

* Fix double click
2023-07-07 15:35:03 +01:00
Xuezhou Dai 0af7b5132d
Add topsites/basic sample (#967)
* Update sample file structure.

* Update description

* Fix wrong favicon path

* Add basic sample

* Update README.md

* Fix comments
2023-07-06 11:19:56 +01:00
Sebastian Benz 2852c64790
Add WebSocket sample (#976)
* Add WebSocket sample

This sample demonstrates how to use a websocket in a service worker.

* add minimum chrome version

* Address comments

* add more detail to the readme
* make sure glitch instance is booted

* fix spelling
2023-07-05 13:18:27 +02:00
Oliver Dunk e8d26131bb
Add sample for tabCapture using offscreen document (#974)
* Add sample for using tabCapture in offscreen document.

* Add recording item to tabCapture demo.

Adds an icon which indicates if recording is currently in
progress.

* Addressed a number of pieces of feedback.

* Apply suggestions from code review

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Add step to pin extension.

* Add comments.

---------

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>
2023-07-04 14:31:31 +01:00
Abhi G 327718cc14
Resolved the broken links (#975) 2023-07-03 15:55:11 +01:00
IanStanion-google 05b8106ce5
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>
2023-06-30 14:13:53 -04:00
IanStanion-google 307da41987
Changes onInstalled event listener to action.onClicked (#971)
* Changes onInstalled event listener to action.onClicked

* Update sandbox.html

* Update sandbox.html
2023-06-30 04:21:28 -04:00
Joe Medley 7e067289c4
Copy edit the privacy README. (#970) 2023-06-28 09:25:08 -07:00
IanStanion-google ef7eb4cd1a
Privacy mv3 sample (#956)
* Implemented mv3 privacy API sample

* Added mv3 privacy API sample

* Expanded sample and updated readme

* Update service-worker.js
2023-06-26 15:57:14 +02:00
IanStanion-google be334066a2
Devtools mv3 samples (#938)
* devtools sample

* Added readme

* Updated readme

* Changed folder structure

* Update devtools.html

* Update devtools.js

* Update devtools.js

* Update api-samples/devtools/chrome-query/chrome-query.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Changed folder name

* readme name change

---------

Co-authored-by: Joe Medley <jmedley@google.com>
2023-06-23 10:08:52 -04:00
IanStanion-google 2527b666a6
Windows api mv3 sample (#959)
* WIP windows API sample

* Update background.js

* Added mv3 windows API sample

* Corrections based on review
2023-06-21 21:01:39 +02:00
IanStanion-google cd11c730ea
Web nav mv3 sample (#958)
* implemented webNavigation mv3 sample

* Added mv3 webNavigation API sample

* Changes based on review
2023-06-21 20:57:59 +02:00
IanStanion-google 0af4863057
Top sites mv3 sample (#957)
* Implemented topsites API sample

* Added topSites mv3 API sample

* Changes based on review
2023-06-21 20:57:18 +02:00
IanStanion-google 29806df1b2
Added mv3 bookmarks API sample (#955)
* Added mv3 bookmarks API sample

* Changes based on review
2023-06-21 20:56:16 +02:00
IanStanion-google 2f74f5563f
Debugger (#950)
* Implement debugger API mv3 sample

* Expands the debugger sample to make use of captured network data

* Update manifest.json

* Create README.md

* Update README.md
2023-06-21 20:55:20 +02:00
IanStanion-google e9c3f98ce7
Rich notifications sample (#949)
* WIP notifications API sample

* Update background.js

* Add image folder from chrome apps sample

* Added mv3 rich notifications sample

* Reworked Notification sample

* Removed deprecated API use
2023-06-21 20:54:23 +02:00
IanStanion-google 0cb5580bcd
Mv3 font settings sample (#960)
* mv3 updated fontSettings sample

* Added mv3 sample for fontSettings

* Implemented simplified font settings sample

* Update popup.js
2023-06-21 20:51:31 +02:00
IanStanion-google c6088ff5ab
Browsing data mv3 sample (#954)
* WIP implementation of an mv3 updated browsingData sample

* Update popup.js

* Implements mv3 browsingData sample

* Corrections based on review
2023-06-21 20:31:07 +02:00
IanStanion-google 41e3f968a5
Added readme and licensing (#953) 2023-06-20 11:58:08 -04:00
patrick kettner 622466f97c
add geolocation samples (#944)
* add geolocation samples

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>
Co-authored-by: Oliver Dunk <oliverdunk@google.com>
2023-06-20 10:03:39 -04:00
Jack Hsieh e7c398bf93
CO2 meter extension - a sample for using WebHID on extension service worker. (#921)
* Initial README.md file

* fix design doc link

* Update README.md adding scheib

* Update README.md

* test

* update README.md with alvinjiooo

* add a ascii fish in README.md

* Update README.md

* skeloton extension

* Add original co2meter.html

* add buttons to settings page

* Initial storage module stub.

* Add storage module reference from settings page.

* Fix settings JS to be module compatible.

* Add stubs for settings storage writing

* Call saveCO2Value() from onInputReport in co2meter.html

* background page to read CO2 periodically based on the stored interval

* verion 1.0 /module/co2_meter.js

* Refactor settings.html and hook up CO2 driver

* update v2 of /module/co2_meter.js which access all methods from CO2Meter class

* Fix co2_meter import in background.js

* background page to show CO2 meter disconnected icon

* v2.1 update /module/co2_meter.js add support for virtual meter and connection listener also rquestPermission

* v2.1 update /module/co2_meter.js

* Import idb-keyval indexedDB library into storage.js, with trivial usage.

* background page handle disconnect connect device

* update v2.2 /module/co2_meter.js make  non-static and add guarding flag for exccessive reading

* update v2.3 /module/co2_meter.js await device to close before open device in

* update v2.4 /module/co2_meter.js change to return reject promise instead of Error in

* Add third-party/idb-keyval, use to set/get interval.

* Simplify settings and storage.

* handle background page device disconnect/connect

* Rename *_script.js files to only *.js.

* Add temp reading

* Add chart to popup.html with chartjs etc.

* Update extension tool tip to show connected/disconnected status.

* use indexedDB to store CO2 reading

* Renaming items in background.js

Name methods more clearly for what they are doing.
Collapse some code when possible to be inline.

* add  in Storage

* add support for storing temperature and query temperature in range

* background page boardcasting reading updated

* Refactor chart out of popup into chart.html for iframing

* Continued: chart out of popup into chart.html for iframing

* Use message channel for message broadcasting and move common constant to constant.js

* Work in progress for data into chart.

* Use set for clients in background page

* Add promise to storage constructor.

* Change IDB version number due to schema change

* Populate chart data.

* check store name before creating when version changed

* increase popup window and iframe size

* Update chart upon new data.

* Add calibration period and refactor inputReport

* Use flexbox to layout pages.

* move internal and temperature unit into setting store

* move dbInitialized into transaction oncomplete event

* remove reading out interval and temp unit log

* Remove co2meter.html

* Add .map files for third party code to remove devtools warnings.

* Display chart in Fahrenheit

* remove idb-keyvalue

* prettier storage.js and add comments to public methods

* Chart style: time axis respects time of data, no data points

* Show dialog on the chart when device is disconnected

* Add Example Data Button

* Close dialog button

* Implement toggling between Celsius / Fahrenheit

* polish co2_meter.js and remove virtual device and change default interval to 30 sec

* Change small icon to CO2 text

* change reading interval default to 30 secs which helps the chart update faster for fresh load case

* Fix lint error

* Clean up console.log

* Add chrome.alarm example

* remove keep alive for reading alarm

* refactor to keep connection open

* add README.md

* strip down

* addressed comments

* add link to README.md

---------

Co-authored-by: Vincent Scheib <scheib@users.noreply.github.com>
Co-authored-by: Alvin Ji <111466895+alvinjiooo@users.noreply.github.com>
Co-authored-by: Alvin Ji <alvinji@chromium.org>
Co-authored-by: Alpaca Jam <alvinji@google.com>
2023-06-16 20:56:03 +02:00
Sebastian Benz 73b7a456ac
Add Google Analytics 4 sample (#930)
* Add Google Analytics 4 sample

* addressed comments
2023-06-15 15:16:23 +02:00
Benjamin Lörincz 48a0060ae2
rearranged methods for better readability (#899) 2023-06-13 22:00:09 +02:00
Mehdi Baneshi 75b4501cd0
Update README.md (#913)
spell checking issue
changed  "to" => "two " ,
with accordance to context
2023-06-13 11:46:17 -05:00
IanStanion-google c00196f9bb
Updated history sample for mv3 (#940)
* Updated history sample for mv3

* Changed filenames

* Update api-samples/history/showHistory/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update show-history.md

* Update api-samples/history/showHistory/show-history.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Update manifest.json

* Update manifest.json

---------

Co-authored-by: Joe Medley <jmedley@google.com>
2023-06-09 13:06:21 -04:00
IanStanion-google 778403f124
Updated contentSettings sample for mv3 (#941)
* Updated contentSettings sample for mv3

* Update api-samples/contentSettings/contentSettings.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Update contentSettings.md

* Update contentSettings.md

* Update manifest.json

---------

Co-authored-by: Joe Medley <jmedley@google.com>
2023-06-07 11:16:05 -04:00
Oliver Dunk 178e272b08
Fixes for web_accessible_resources sample. (#946)
* Fixes for web_accessible_resources sample.

* Address feedback.
2023-06-07 16:13:12 +01:00
Joe Medley 2a89694245
Fix typos. (#943) 2023-06-07 08:00:30 -07:00
yiminghe eea2fd1b23
Update cookbook.offscreen-clipboard-write README.md (#942) 2023-06-06 09:29:59 -05:00
Zowie 223211a239
fix: deconstruct the reaction field (#937) 2023-06-06 09:28:50 -05:00
IanStanion-google c32803f138
Updated url_override samples to mv3 (minimal changes) (#936)
* Updated url_override samples to mv3 (minimal changes)

* Delete manifest.json

* Delete redirect.html
2023-06-05 14:05:38 -04:00
IanStanion-google 56952ea28e
Added 2 sandbox samples (#919)
* Added 2 sandbox samples

* Updated readme style

* Updated readme for 2nd Sandbox sample

* Replaced windows API with Tabs to modernize

* Small update to readme

* Update api-samples/Sandbox/sandbox/mainpage.js

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/Sandbox/sandbox/main.js

Co-authored-by: Joe Medley <jmedley@google.com>

* Update main.js

* Update main.js

* Update mainpage.html

* Update mainpage.js

* Update manifest.json

* Update sandbox.html

* Update main.js

* Update main.js

* Update manifest.json

* changing folder case

* case change

* Minor cleanup

* Update sandbox.html

* Update sandbox.html

* Update sandbox.html

* Update api-samples/sandbox/sandbox/sandbox.html

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/sandbox/sandbox/sandbox.html

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/sandbox/sandbox/sandbox.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/sandbox/sandboxed-content/sandboxed-content.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/sandbox/sandboxed-content/sandboxed-content.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Changed filename to service-worker.js

* Update api-samples/sandbox/sandbox/mainpage.js

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/sandbox/sandbox/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/sandbox/sandboxed-content/manifest.json

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/sandbox/sandboxed-content/service-worker.js

Co-authored-by: Joe Medley <jmedley@google.com>

* Update sandbox.md

* Update sandboxed-content.md

* Update manifest.json

* Update manifest.json

---------

Co-authored-by: Joe Medley <jmedley@google.com>
2023-06-05 12:15:45 -04:00
Oliver Dunk d6493a71ac Merge branch 'fishoe-main' 2023-06-05 16:53:17 +01:00
Oliver Dunk c3728d904d Merge branch 'main' of github.com:fishoe/chrome-extensions-samples into fishoe-main 2023-06-05 16:52:58 +01:00
amysteamdev 0e8881c6ce
Add "Running this extension" section to template (#935)
* Add Running this extension section to template

* Update README-template.md
2023-06-01 07:13:27 -05:00
Xuezhou Dai 961028b1bf
Add tabCapture sample (#933)
* Add tabCapture sample

* Add README

* Update receiver.html

* Fix variable loss caused by idle

* Use windows.create

* Remove unnecessary logs

* Update README

* Update api-samples/tabCapture/README.md

Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>

* Update api-samples/tabCapture/README.md

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Update api-samples/tabCapture/README.md

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Update api-samples/tabCapture/README.md

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Rename background.js

* Remove unnecessary async function

* Move the script to the body

* Update api-samples/tabCapture/README.md

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Update README.md

* Update api-samples/tabCapture/manifest.json

Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>

---------

Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>
Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>
2023-06-01 10:51:54 +01:00
amysteamdev ee2c6fcad0
Switch to service worker (#924) 2023-05-22 09:41:06 -05:00
IanStanion-google 175868f4ac
webRequest onAuthRequired sample (#909)
* webRequest onAuthRequired sample

* Update background.js

* Update api-samples/webRequest/manifest.json

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>

* Update manifest.json

* Update background.js

* Update background.js

* Changed background to service worker

* Update manifest.json

* Update service-worker.js

* Changed folder organization

* Update api-samples/webRequest/http-auth/service-worker.js

Co-authored-by: Oliver Dunk <oliverdunk@google.com>

* Update api-samples/webRequest/http-auth/manifest.json

Co-authored-by: Oliver Dunk <oliverdunk@google.com>

* Added readme and corrected code

* Corrected readme

* Update manifest.json

* Update api-samples/webRequest/http-auth/http-auth.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Update api-samples/webRequest/http-auth/http-auth.md

Co-authored-by: Joe Medley <jmedley@google.com>

* Update service-worker.js

* Update manifest.json

---------

Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>
Co-authored-by: Oliver Dunk <oliverdunk@google.com>
Co-authored-by: Joe Medley <jmedley@google.com>
2023-05-22 09:28:21 -04:00
IanStanion-google eb4acc3d06
i18n API sample (#923) 2023-05-19 12:57:02 -04:00
amysteamdev 5ffd262abc
Add helpful links to WASM readme (#920) 2023-05-18 08:50:09 -05:00
Nathan Muggli 0168b30a67
Update printers table headers to match data (#912) 2023-05-12 12:51:06 -07:00