-
Notifications
You must be signed in to change notification settings - Fork 3
Chrome Extensions API
Calls to APIs made through background script
List of available APIs can be found: https://developer.chrome.com/extensions/api_index
API's think may be useful:
browserAction Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its icon, a browser action can have a tooltip, a badge, and a popup.
events The chrome.events namespace contains common types used by APIs dispatching events to notify you when something interesting happens.
extension The chrome.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.
permissions Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary.
runtime Use the chrome.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs.
storage Use the chrome.storage API to store, retrieve, and track changes to user data.
// Save it using the Chrome extension storage API.
chrome.storage.sync.set({'foo': 'hello', 'bar': 'hi'}, function() {
console.log('Settings saved');
});
// Read it using the storage API
chrome.storage.sync.get(['foo', 'bar'], function(items) {
message('Settings retrieved', items);
});
tabs Use the chrome.tabs API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.
webNavigation Use the chrome.webNavigation API to receive notifications about the status of navigation requests in-flight.
webRequest Use the chrome.webRequest API to observe and analyze traffic and to intercept, block, or modify requests in-flight.
windows Use the chrome.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser.