mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-27 13:29:34 +07:00
* 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>
chrome.bookmarks
This sample demonstrates using the chrome.bookmarks API to search through, add, and delete bookmarks from the user's bookmark tree.
Overview
The full bookmark tree is displayed on the extension popup usin chrome.bookmarks.getTree.
chrome.bookmarks.createis used to add 'https://www.google.com/' to the user's bookmarks. The chrome.bookmarks.remove and chrome.bookmarks.search APIs are used to find and delete any bookmarks that match 'https://www.google.com/'.
Running this extension
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Pin the extension to the taskbar and open up the popup by clicking the action button.
- Experiment with adding and removing bookmarks using the buttons within the popup.