11 Commits

Author SHA1 Message Date
Oliver Dunk
21beba49c2 Fix formatting in printing sample (#1033) 2023-11-21 14:43:43 +00:00
Nathan Muggli
37b9846f69 Add roll printing sample (#1006)
* 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>
2023-11-21 13:22:52 +00:00
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
Nathan Muggli
0168b30a67 Update printers table headers to match data (#912) 2023-05-12 12:51:06 -07:00
Benjamin Lörincz
dc5d34f0f7 pretty print (#895)
* added json for prettier, npm run prettier in lint-staged
2023-05-01 11:29:59 -04:00
Benjamin Lörincz
8e1afb6f03 enhanced default_icon, pretty print (#901) 2023-05-01 10:04:58 -04:00
Joe Medley
7f9f5b8482 Change passive to active voice in printer README. (#882)
* Change passive to active voice in printer README.

* Update api-samples/printing/README.md

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

---------

Co-authored-by: Oliver Dunk <oliverdunk@google.com>
2023-04-13 07:06:23 -07:00
Joe Medley
d7f3d83a55 Printer (#858)
* Add printer status listener.

* Show printer status in popup.

* Fix Status display.

* Implement cancelJob().

* Correct script typos.

* Add important keyword to CSS.

* Refactor element pointers.

* Rewrite callbacks to promises.

* Fix CSS.

* Fix variable name.

* Move Print button to front of line.

* Restore old style of submitJob().

* Fix bugs.

* adding print job table along with cancel button (#847)

* adding print job table along with cancel button

* make cancel button hidden conditionally and scroll to buttom after print button is clicked

* Fix spelling.

* Update api-samples/printing/printers.js

* Add README file.

* Readme corrections.

* Update api-samples/printing/README.md

* Update api-samples/printing/README.md

* Update api-samples/printing/README.md

* Create an addCell() function.

* Fix position of addCell().

* Rearange popup layout.

* More rearranging.

* Add a warning about the print job table.

* Feedback from Patrick.

* Lint and update strings.

---------

Co-authored-by: rayxu-google <120415990+rayxu-google@users.noreply.github.com>
2023-04-05 13:35:58 -07:00
Sebastian Benz
d0dd2c3a9e Eslint: don't allow var (#856) 2023-03-20 19:36:40 +01:00
Sebastian Benz
dc2174377a Add prettier and eslint (#831)
* Ignores archived samples
* Uses eslint/recommended rules
* Runs prettier and eslint (including --fix) pre-commit via husky
* Adds new npm scripts: 'lint', 'lint:fix' and 'prettier'
* Does not lint inline js code
* Fix all prettier and eslint errors
* Add custom prettier rules
* Apply custom prettier rules
* Update readme to explain how to setup the repo
* addressed comments
2023-02-22 13:25:39 +01:00
rayxu-google
299f2134cb Migrate chrome.printing api sample from v2 to v3 manifest (#829)
* migrate chrome.printing api sample from v2 to v3 manifest

* Restore MV2 printing sample.

---------

Co-authored-by: Oliver Dunk <oliverdunk@google.com>
2023-02-16 10:39:52 +00:00