mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-27 13:29:34 +07:00
* Add pin sample * Add README.md * Add screenshot sample * Add README.md * Add zoom sample * Add README.md * Add inspector sample * Add README.md * Fix typo * Remove wrapper * Remove inline style * Update api-samples/tabs/pin/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/screenshot/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/zoom/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/zoom/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/zoom/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/zoom/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/inspector/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/zoom/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update README * Update for loop * Remove children select * Change selected to active * Fix event listener * Set checkboxs to disabled * Fix layout * Fix wrong input data in create tab function * Update api-samples/tabs/zoom/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update description * Update description * Update description * Fix typo * Update description * Rename * Fix file name * Update active check box * Update code style * Update api-samples/tabs/zoom/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/pin/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/pin/README.md Co-authored-by: Joe Medley <jmedley@google.com> * Apply suggestions from code review Co-authored-by: Joe Medley <jmedley@google.com> * Update api-samples/tabs/inspector/manifest.json Co-authored-by: Joe Medley <jmedley@google.com> * Fix case issues * Update api-samples/tabs/inspector/manifest.json --------- Co-authored-by: Joe Medley <jmedley@google.com> Co-authored-by: Oliver Dunk <oliver@oliverdunk.com>
chrome.tabs - Keyboard Pin
A sample that demonstrates how to use the chrome.tabs API to toggle the pinned state of the current tab.
Overview
In this sample, a new keyboard shortcut (Alt + Shift + P) is enabled to pin the current tab.
Implementation Notes
Chrome fires chrome.commands.onCommand when the user presses a registered keyboard shortcut.
Calls chrome.tabs.update() to pin or unpin the current tab.
Running this extension
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Press Alt + Shift + P to pin the current tab.