Loading web-font TeX/Math/Italic
1 Star 0 Fork 0

David/chrome-extensions-samples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

Chrome Extensions samples

Official samples for Chrome Extensions and the Chrome Apps platform. Note that Chrome Apps are deprecated—learn more on the Chromium blog.

For more information on extensions, see Chrome Developers.

Samples

The directory structure is as follows:

  • api/ - extensions focused on a single API package
  • howto/ - extensions that show how to perform a particular task
  • tutorials/ - multi-step walkthroughs referenced inline in the docs
  • extensions/ - full featured extensions spanning multiple API packages
  • apps/ - deprecated Chrome Apps platform (not listed below)

To experiment with these samples, please clone this repo and use 'Load Unpacked Extension'. Read more on Getting Started.

Sample Calls
My Bookmarks
A browser action with a popup dump of all bookmarks, including search, add, edit and delete.
  • bookmarks.create
  • bookmarks.getTree
  • bookmarks.remove
  • bookmarks.update
  • tabs.create
Page Redder
Make the current page red
  • browserAction.onClicked
  • tabs.executeScript
Print this page
Adds a print button to the browser.
  • browserAction.onClicked
  • tabs.executeScript
A browser action which changes its icon when clicked
Click browser action icon to change color!
  • browserAction.onClicked
  • browserAction.setIcon
  • runtime.onInstalled
  • storage.StorageArea.get
  • storage.StorageArea.set
A browser action with a popup that changes the page color
Change the current page color
  • tabs.executeScript
BrowsingData API: Basics
A trivial usage example.
  • browsingData.remove
Sample Extension Commands extension
Press Ctrl+Shift+F to open the browser action popup, press Ctrl+Shift+Y to send an event.
  • commands.onCommand
Content settings
Shows the content settings for the current site.
  • contentSettings.ContentSetting.get
  • contentSettings.ContentSetting.set
  • tabs.query
Context Menus Sample
Shows some of the features of the Context Menus API
  • contextMenus.create
  • extension.lastError
Context Menus Sample (with Event Page)
Shows some of the features of the Context Menus API using an event page
  • contextMenus.create
  • contextMenus.onClicked
  • extension.lastError
  • runtime.onInstalled
Global Google Search
Use the context menu to search a different country's Google
  • contextMenus.create
  • contextMenus.onClicked
  • contextMenus.remove
  • runtime.onInstalled
  • storage.onChanged
  • storage.StorageArea.get
  • storage.StorageArea.set
  • tabs.create
Cookie API Test Extension
Testing Cookie API
  • browserAction.onClicked
  • cookies.getAll
  • cookies.onChanged
  • cookies.remove
  • extension.getURL
  • tabs.create
  • tabs.update
  • windows.getAll
Live HTTP headers
Displays the live log with the http requests headers
  • browserAction.onClicked
  • debugger.attach
  • debugger.detach
  • debugger.onEvent
  • debugger.sendCommand
  • runtime.lastError
  • windows.create
JavaScript pause/resume
Pauses / resumes JavaScript execution
  • browserAction.onClicked
  • browserAction.setIcon
  • browserAction.setTitle
  • debugger.attach
  • debugger.detach
  • debugger.onDetach
  • debugger.onEvent
  • debugger.sendCommand
  • runtime.lastError
Tab Flipper
Press Ctrl+Shift+Right or Ctrl+Shift+Left (Command+Shift+Right or Command+Shift+Left on a Mac) to flip through window tabs
  • commands.onCommand
  • tabs.query
  • tabs.update
Desktop Capture Example
Show desktop media picker UI
  • desktopCapture.cancelChooseDesktopMedia
  • desktopCapture.chooseDesktopMedia
  • runtime.onMessage
  • runtime.sendMessage
My Devices
A browser action with a popup dump of all devices signed into the same account as the current profile.
  • signedInDevices.get
  • signedInDevices.onDeviceInfoChange
FirePHP for Chrome
Extends the Developer Tools, adding support for parsing FirePHP messages from server
  • devtools.network.getHAR
  • devtools.network.onRequestFinished
  • extension.onRequest
  • extension.sendRequest
  • tabs.executeScript
Chrome Query
Extends the Developer Tools, adding a sidebar that displays the jQuery data associated with the selected DOM element.
  • devtools.panels.ElementsPanel.createSidebarPane
  • devtools.panels.ElementsPanel.onSelectionChanged
tabCast
Creates a WiFi Display Session from the captured tab media stream using chrome.displaySource API.
  • displaySource.getAvailableSinks
  • displaySource.onSessionTerminated
  • displaySource.onSinksUpdated
  • displaySource.startSession
  • displaySource.terminateSession
  • extension.getBackgroundPage
  • runtime.lastError
  • runtime.onMessage
  • runtime.sendMessage
  • tabCapture.capture
  • tabs.getCurrent
Document Scanning API Sample
  • documentScan.scan
  • permissions.contains
  • permissions.request
  • runtime.lastError
Download Filename Controller
Download Filename Controller
  • downloads.onDeterminingFilename
Download Selected Links
Select links on a page and download them.
  • downloads.download
  • extension.onRequest
  • extension.sendRequest
  • tabs.executeScript
  • tabs.query
  • windows.getCurrent
Download Manager Button
Browser Action Download Manager User Interface for Google Chrome
  • browserAction.setIcon
  • downloads.acceptDanger
  • downloads.cancel
  • downloads.download
  • downloads.erase
  • downloads.getFileIcon
  • downloads.onChanged
  • downloads.onCreated
  • downloads.onErased
  • downloads.open
  • downloads.pause
  • downloads.removeFile
  • downloads.resume
  • downloads.search
  • downloads.setShelfEnabled
  • downloads.show
  • downloads.showDefaultFolder
  • i18n.getMessage
  • permissions.contains
  • permissions.request
  • runtime.onMessage
  • runtime.sendMessage
  • tabs.create
Download and Open Button
Download and Open Context Menu Button
  • contextMenus.create
  • contextMenus.onClicked
  • downloads.download
  • downloads.onChanged
  • downloads.open
  • i18n.getMessage
Downloads Overwrite Existing Files
All downloads overwrite existing files instead of adding ' (1)', ' (2)', etc.
  • downloads.onDeterminingFilename
Event Page Example
Demonstrates usage and features of the event page
  • alarms.create
  • alarms.onAlarm
  • bookmarks.onRemoved
  • browserAction.onClicked
  • browserAction.setBadgeText
  • commands.onCommand
  • declarativeWebRequest.RedirectRequest
  • declarativeWebRequest.RequestMatcher
  • runtime.onInstalled
  • runtime.onMessage
  • runtime.onSuspend
  • runtime.sendMessage
  • tabs.create
  • tabs.executeScript
  • tabs.query
  • tabs.sendMessage
extension.isAllowedFileSchemeAccess and extension.isAllowedIncognitoAccess Example
Demonstrates the extension.isAllowedFileSchemeAccess and extesion.isAllowedIncognitoAccess APIs
  • extension.isAllowedFileSchemeAccess
  • extension.isAllowedIncognitoAccess
Fake Archive Handler App
Demonstrate File System Provider API usage for apps.
  • fileSystemProvider.get
  • fileSystemProvider.mount
  • fileSystemProvider.onCloseFileRequested
  • fileSystemProvider.onGetMetadataRequested
  • fileSystemProvider.onOpenFileRequested
  • fileSystemProvider.onReadDirectoryRequested
  • fileSystemProvider.onReadFileRequested
  • fileSystemProvider.onUnmountRequested
  • fileSystemProvider.unmount
  • runtime.lastError
  • runtime.onStartup
  • runtime.onSuspend
  • storage.StorageArea.get
  • storage.StorageArea.set
File System Provider API Extension Example
Demonstrate features of the API like mounting, listing directories, etc for extensions.
  • fileSystemProvider.mount
  • fileSystemProvider.onCloseFileRequested
  • fileSystemProvider.onGetMetadataRequested
  • fileSystemProvider.onMountRequested
  • fileSystemProvider.onOpenFileRequested
  • fileSystemProvider.onReadDirectoryRequested
  • fileSystemProvider.onReadFileRequested
  • fileSystemProvider.onUnmountRequested
  • fileSystemProvider.unmount
  • runtime.lastError
Advanced Font Settings
Customize per-script font settings.
  • fontSettings.clearDefaultFixedFontSize
  • fontSettings.clearDefaultFontSize
  • fontSettings.clearFont
  • fontSettings.clearMinimumFontSize
  • fontSettings.getDefaultFixedFontSize
  • fontSettings.getDefaultFontSize
  • fontSettings.getFont
  • fontSettings.getFontList
  • fontSettings.getMinimumFontSize
  • fontSettings.onDefaultFixedFontSizeChanged
  • fontSettings.onDefaultFontSizeChanged
  • fontSettings.onFontChanged
  • fontSettings.onMinimumFontSizeChanged
  • fontSettings.setDefaultFixedFontSize
  • fontSettings.setDefaultFontSize
  • fontSettings.setFont
  • fontSettings.setMinimumFontSize
History Override
Overrides the History Page
  • history.deleteAll
  • history.deleteUrl
  • history.search
Typed URL History
Reads your history, and shows the top ten pages you go to by typing the URL.
  • history.getVisits
  • history.search
  • tabs.create
CLD
Displays the language of a tab
  • browserAction.setBadgeText
  • tabs.detectLanguage
  • tabs.onSelectionChanged
  • tabs.onUpdated
  • tabs.query
Detect Language
Detects up to 3 languages and their percentages of the provided string
  • i18n.detectLanguage
AcceptLanguage
Returns accept languages of the browser
  • i18n.getAcceptLanguages
  • i18n.getMessage
Minimal Localized Hosted App
This is the minimal set of data required to upload a localized hosted application to the web store.
    Idle - Simple Example
    Demonstrates the Idle API
    • browserAction.onClicked
    • extension.getBackgroundPage
    • idle.onStateChanged
    • idle.queryState
    Test IME
    A simple IME that converts all keystrokes to upper case.
    • input.ime
    • input.ime.commitText
    • input.ime.onActivate
    • input.ime.onBlur
    • input.ime.onDeactivated
    • input.ime.onFocus
    • input.ime.onKeyEvent
    Message Timer
    Times how long it takes to send a message to a content script and back.
    • runtime.onConnect
    • runtime.onMessage
    • tabs.connect
    • tabs.query
    • tabs.sendMessage
    Native Messaging Example
    Send a message to a native application.
    • runtime.connectNative
    Notification Demo
    Shows off desktop notifications, which are "toast" windows that pop up on the desktop.
      Omnibox New Tab Search
      Type 'nt' plus a search term into the Omnibox to open search in new tab.
      • omnibox.onInputEntered
      • tabs.create
      Omnibox Example
      To use, type 'omnix' plus a search term into the Omnibox.
      • omnibox.onInputChanged
      • omnibox.onInputEntered
      Blank new tab page
      Override the new tab page with a blank one
        iGoogle new tab page
        Override the new tab page with iGoogle
          Page action by content
          Shows a page action for HTML pages containing a video
          • declarativeContent.PageStateMatcher
          • declarativeContent.ShowPageAction
          • runtime.onInstalled
          Page action by URL
          Shows a page action for urls which have the letter 'g' in them.
          • declarativeContent.PageStateMatcher
          • declarativeContent.ShowPageAction
          • runtime.onInstalled
          Animated Page Action
          This extension adds an animated browser action to the toolbar.
          • pageAction.hide
          • pageAction.onClicked
          • pageAction.setIcon
          • pageAction.setTitle
          • pageAction.show
          • tabs.onSelectionChanged
          • tabs.query
          Top Chrome Extension Questions
          Sample demonstration of the optional permissions API.
          • permissions.contains
          • permissions.onAdded
          • permissions.onRemoved
          • permissions.remove
          • permissions.request
          • tabs.create
          Keep Awake
          Override system power-saving settings.
          • browserAction.onClicked
          • browserAction.setIcon
          • browserAction.setTitle
          • i18n.getMessage
          • power.releaseKeepAwake
          • power.requestKeepAwake
          • runtime.onInstalled
          • runtime.onStartup
          • storage.StorageArea.get
          • storage.StorageArea.set
          Block/allow third-party cookies API example extension
          Sample extension which demonstrates how to access a preference.
          • extension.isAllowedIncognitoAccess
          Block/allow referrer API example extension
          Sample extension which demonstrates how to access a preference.
          • extension.isAllowedIncognitoAccess
          Print Extension
          Sends print job directly to the printers installed on the Chromebook
          • printing.getPrinterInfo
          • printing.getPrinters
          • printing.submitJob
          • runtime.lastError
          Print Job History
          Reads your print history and displays the recent print jobs.
          • browserAction.setBadgeText
          • printingMetrics.getPrintJobs
          • printingMetrics.onPrintJobFinished
          • storage.StorageArea.get
          • storage.StorageArea.set
          Process Monitor
          Adds a browser action that monitors resource usage of all browser processes.
          • processes.onUpdatedWithMemory
          • processes.terminate
          Show Tabs in Process
          Adds a browser action showing which tabs share the current tab's process.
          • processes.getProcessIdForTab
          • tabs.query
          • tabs.update
          • windows.getAll
          • windows.getCurrent
          • windows.update
          Stylizr
          Spruce up your pages with custom CSS.
          • extension.getURL
          • runtime.lastError
          • storage.local
          • storage.StorageArea.clear
          • storage.StorageArea.get
          • storage.StorageArea.remove
          • storage.StorageArea.set
          • tabs.insertCSS
          Tab Capture Example
          Capture a tab and play in a
          • browserAction.onClicked
          • storage.StorageArea.get
          • storage.StorageArea.set
          • tabCapture.capture
          • tabCapture.getMediaStreamId
          Tab Inspector
          Utility for working with the extension tabs api
          • browserAction.onClicked
          • extension.getURL
          • tabs.create
          • tabs.get
          • tabs.getAllInWindow
          • tabs.move
          • tabs.onAttached
          • tabs.onCreated
          • tabs.onDetached
          • tabs.onMoved
          • tabs.onRemoved
          • tabs.onSelectionChanged
          • tabs.onUpdated
          • tabs.query
          • tabs.remove
          • tabs.update
          • windows.create
          • windows.get
          • windows.getAll
          • windows.getCurrent
          • windows.getLastFocused
          • windows.onCreated
          • windows.onFocusChanged
          • windows.onRemoved
          • windows.remove
          • windows.update
          Keyboard Pin
          Creates a keyboard shortcut (Alt + Shift + P) to toggle the pinned state of the currently selected tab
          • commands.onCommand
          • tabs.query
          • tabs.update
          Test Screenshot Extension
          Demonstrate screenshot functionality in the chrome.tabs api.
          • browserAction.onClicked
          • extension.getURL
          • extension.getViews
          • tabs.captureVisibleTab
          • tabs.create
          • tabs.onUpdated
          Tabs Zoom API Demo
          This extension allows the user to explore features of the new tabs zoom api.
          • runtime.lastError
          • tabs.getZoom
          • tabs.getZoomSettings
          • tabs.onZoomChange
          • tabs.query
          • tabs.setZoom
          • tabs.setZoomSettings
          Top Sites
          Shows the top sites in a browser action
          • tabs.create
          • topSites.get
          NTP prototyping extension
          extension to prototype new NTP designs
          • topSites.get
          Console TTS Engine
          A "silent" TTS engine that prints text to a small window rather than synthesizing speech.
          • extension.getViews
          • ttsEngine.onSpeak
          • ttsEngine.onStop
          • windows.create
          • windows.getCurrent
          • windows.onRemoved
          Drink Water Event Popup
          Demonstrates usage and features of the event page by reminding user to drink water
          • alarms.clearAll
          • alarms.create
          • alarms.onAlarm
          • browserAction.setBadgeText
          • notifications.create
          • notifications.onButtonClicked
          • storage.StorageArea.get
          • storage.StorageArea.set
          WebNavigation Tech Demo
          Demonstration of the WebNavigation extension API.
          • i18n.getMessage
          • runtime.onMessage
          • runtime.onStartup
          • runtime.sendMessage
          • storage.StorageArea.get
          • storage.StorageArea.set
          • webNavigation.onBeforeNavigate
          • webNavigation.onCommitted
          • webNavigation.onCompleted
          • webNavigation.onCreatedNavigationTarget
          • webNavigation.onErrorOccurred
          • webNavigation.onHistoryStateUpdated
          • webNavigation.onReferenceFragmentUpdated
          Webview transparency
          Sample of the webview.captureVisibleRegion api
            WebView Extension Communications Demo: App
            • runtime.connect
            WebView Extension Communications Demo: Extension
            Provides content scripts to an app hosting a WebView.
            • runtime.id
            • runtime.onConnectExternal
            Merge Windows
            Merges all of the browser's windows into the current window
            • browserAction.onClicked
            • tabs.getAllInWindow
            • tabs.move
            • windows.getAll
            • windows.getCurrent
            Simple Background App
              Calculator
              A simple calculator.
                App Launcher
                Get access to your apps in a browser action
                • extension.getURL
                • management.getAll
                • management.launchApp
                • tabs.create
                Chromium Buildbot Monitor
                Displays the status of the Chromium buildbot in the toolbar. Click to see more detailed status in a popup.
                • browserAction.setBadgeBackgroundColor
                • browserAction.setBadgeText
                • browserAction.setTitle
                • extension.getBackgroundPage
                • extension.getURL
                • extension.getViews
                • storage.StorageArea.get
                • storage.StorageArea.set
                Google Calendar Checker (by Google)
                Quickly see the time until your next meeting from any of your calendars. Click on the button to be taken to your calendar.
                • browserAction.onClicked
                • browserAction.setBadgeBackgroundColor
                • browserAction.setBadgeText
                • i18n.getMessage
                • management.uninstallSelf
                • notifications.clear
                • notifications.create
                • notifications.onButtonClicked
                • notifications.onClicked
                • runtime.getURL
                • runtime.id
                • runtime.onInstalled
                • tabs.create
                CatBlock
                I can't has cheezburger!
                • webRequest.onBeforeRequest
                Catifier
                Moar cats!
                • declarativeWebRequest.IgnoreRules
                • declarativeWebRequest.RedirectRequest
                • declarativeWebRequest.RequestMatcher
                • runtime.lastError
                • runtime.onInstalled
                Chromium Search
                Add support to the omnibox to search the Chromium source code.
                • omnibox.onInputCancelled
                • omnibox.onInputChanged
                • omnibox.onInputEntered
                • omnibox.onInputStarted
                • omnibox.setDefaultSuggestion
                • tabs.query
                • tabs.update
                Constant Context
                Highlights elements with keywords on developer.chrome
                • declarativeContent.PageStateMatcher
                • declarativeContent.ShowPageAction
                • runtime.onInstalled
                • storage.StorageArea.clear
                • storage.StorageArea.get
                • storage.StorageArea.set
                • tabs.executeScript
                Download Images
                Displays all webpage images and allows user to download
                • declarativeContent.PageStateMatcher
                • declarativeContent.ShowPageAction
                • downloads.download
                • runtime.lastError
                • runtime.onInstalled
                • storage.StorageArea.get
                • storage.StorageArea.set
                • tabs.create
                • tabs.executeScript
                Email this page (by Google)
                This extension adds an email button to the toolbar which allows you to email the page link using your default mail client or Gmail.
                • browserAction.onClicked
                • runtime.connect
                • runtime.onConnect
                • tabs.create
                • tabs.executeScript
                • tabs.update
                Chrome Sounds
                Enjoy a more magical and immersive experience when browsing the web using the power of sound.
                • bookmarks.onCreated
                • bookmarks.onMoved
                • bookmarks.onRemoved
                • extension.getBackgroundPage
                • extension.onRequest
                • extension.sendRequest
                • tabs.get
                • tabs.onAttached
                • tabs.onCreated
                • tabs.onDetached
                • tabs.onMoved
                • tabs.onRemoved
                • tabs.onSelectionChanged
                • tabs.onUpdated
                • windows.onCreated
                • windows.onFocusChanged
                • windows.onRemoved
                Google Document List Viewer
                Demonstrates how to use OAuth to connect the Google Documents List Data API.
                • extension.getBackgroundPage
                • extension.getURL
                • tabs.create
                • tabs.onUpdated
                • tabs.query
                • tabs.remove
                Google Mail Checker
                Displays the number of unread messages in your Google Mail inbox. You can also click the button to open your inbox.
                • alarms.create
                • alarms.get
                • alarms.onAlarm
                • browserAction.onClicked
                • browserAction.setBadgeBackgroundColor
                • browserAction.setBadgeText
                • browserAction.setIcon
                • i18n.getMessage
                • runtime.onInstalled
                • runtime.onStartup
                • runtime.onStartup
                • tabs.create
                • tabs.getAllInWindow
                • tabs.onUpdated
                • tabs.update
                • webNavigation.onDOMContentLoaded
                • webNavigation.onDOMContentLoaded
                • webNavigation.onReferenceFragmentUpdated
                • webNavigation.onReferenceFragmentUpdated
                • windows.onCreated
                Imageinfo
                Get image info for images, including EXIF data
                • contextMenus.create
                • tabs.getCurrent
                • windows.create
                • windows.update
                Chromium IRC App
                  Managed Bookmarks
                  Adds bookmarks configured by your system administrator to Chrome.
                  • bookmarks.create
                  • bookmarks.getChildren
                  • bookmarks.move
                  • bookmarks.onChanged
                  • bookmarks.onMoved
                  • bookmarks.onRemoved
                  • bookmarks.remove
                  • bookmarks.removeTree
                  • bookmarks.update
                  • runtime.onInstalled
                  • storage.StorageArea.get
                  • storage.StorageArea.set
                  • storage.StorageArea.get
                  • storage.onChanged
                  Mappy
                  Finds addresses in the web page you're on and pops up a map window.
                  • pageAction.setTitle
                  • pageAction.show
                  • runtime.onMessage
                  • runtime.sendMessage
                  • storage.StorageArea.get
                  • storage.StorageArea.set
                  Google Maps
                    News Reader (by Google)
                    Displays the latest stories from Google News in a popup.
                    • extension.getURL
                    • i18n.getMessage
                    • tabs.create
                    News Reader
                    Displays the first 5 items from the 'Google News - top news' RSS feed in a popup.
                    • tabs.create
                    News Reader
                    Displays the first 5 items from the 'Google News - top news' RSS feed in a popup.
                      No Cookies
                      Removes 'Cookie' and 'Set-Cookie' headers.
                      • webRequest.onBeforeSendHeaders
                      • webRequest.onHeadersReceived
                      Sample - OAuth Contacts
                      Uses OAuth to connect to Google's contacts service and display a list of your contacts.
                      • browserAction.onClicked
                      • browserAction.setIcon
                      • extension.getBackgroundPage
                      • extension.getURL
                      • tabs.create
                      • tabs.onUpdated
                      • tabs.query
                      • tabs.remove
                      Optional Permissions New Tab
                      Demonstrates optional permissions in extensions
                      • permissions.contains
                      • permissions.request
                      • storage.StorageArea.get
                      • storage.StorageArea.set
                      • topSites.get
                      Per-plugin content settings
                      Customize your content setting for different plugins.
                      • contentSettings.plugins
                      • contentSettings.ContentSetting.clear
                      • contentSettings.ContentSetting.getResourceIdentifiers
                      • contentSettings.ContentSetting.set
                      • i18n.getMessage
                      • runtime.lastError
                      Proxy Extension API Sample
                      Set Chrome-specific proxies; a demonstration of Chrome's Proxy API
                      • browserAction.setBadgeBackgroundColor
                      • browserAction.setBadgeText
                      • browserAction.setTitle
                      • extension.isAllowedIncognitoAccess
                      • extension.onRequest
                      • extension.sendRequest
                      • i18n.getMessage
                      • proxy.onProxyError
                      • runtime.lastError
                      Speak Selection
                      Speaks the current selection out loud.
                      • browserAction.onClicked
                      • browserAction.setIcon
                      • extension.getURL
                      • extension.onRequest
                      • extension.sendRequest
                      • tabs.create
                      • tabs.executeScript
                      • tabs.sendRequest
                      • tts.getVoices
                      • tts.speak
                      • tts.stop
                      • windows.getAll
                      Talking Alarm Clock
                      A clock with two configurable alarms that will play a sound and speak a phrase of your choice.
                      • browserAction.setIcon
                      • runtime.connect
                      • runtime.onConnect
                      • tts.getVoices
                      • tts.speak
                      • tts.stop
                      TTS Debug
                      Tool for developers of Chrome TTS engine extensions to help them test their engines are implementing the API correctly.
                      • tts.getVoices
                      • tts.speak
                      • tts.stop
                      TTS Demo
                      Demo Chrome's synthesized text-to-speech capabilities.
                      • runtime.lastError
                      • tts.getVoices
                      • tts.isSpeaking
                      • tts.speak
                      • tts.stop
                      Sandboxed Frame
                      Demonstrate use of handlebars inside a sandboxed frame
                      • browserAction.onClicked
                      Tab Shortcuts
                      Allows pinning and duplication of tabs via keyboard shortcuts.
                      • commands.onCommand
                      • tabs.duplicate
                      • tabs.update
                      Event Tracking with Google Analytics
                      A sample extension which uses Google Analytics to track usage.
                        Broken Background Color
                        Fix an Extension!
                        • declarativeContent.PageStateMatcher
                        • declarativeContent.ShowPageAction
                        • storage.StorageArea.get
                        • storage.StorageArea.set
                        • tabs.executeScript
                        Getting Started Example
                        Build an Extension!
                        • runtime.onInstalled
                        • storage.StorageArea.get
                        • storage.StorageArea.set
                        Getting Started Example
                        Build an Extension!
                        • declarativeContent.PageStateMatcher
                        • declarativeContent.ShowPageAction
                        • runtime.onInstalled
                        • storage.StorageArea.get
                        • storage.StorageArea.set
                        • tabs.executeScript
                        • tabs.query
                        Getting started example
                        This extension allows the user to change the background color of the current page.
                        • runtime.lastError
                        • storage.local
                        • storage.sync
                        • storage.StorageArea.get
                        • storage.StorageArea.set
                        • tabs.executeScript
                        • tabs.query
                        Hello Extensions
                        Base Level Extension
                          OAuth Tutorial FriendBlock
                          Uses OAuth to connect to Google's People API and display contacts photos.
                          • browserAction.onClicked
                          • identity.getAuthToken
                          • tabs.create
                          OAuth Tutorial FriendBlock
                          Uses OAuth to connect to Google's People API and display contacts photos.
                          • browserAction.onClicked
                          • identity.getAuthToken
                          • tabs.create
                          Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

                          简介

                          暂无描述 展开 收起
                          Apache-2.0
                          取消

                          发行版

                          暂无发行版

                          近期动态

                          4年多前创建了仓库
                          不能加载更多了
                          马建仓 AI 助手
                          尝试更多
                          代码解读
                          代码找茬
                          代码优化
                          1
                          https://gitee.com/df_coding/chrome-extensions-samples.git
                          git@gitee.com:df_coding/chrome-extensions-samples.git
                          df_coding
                          chrome-extensions-samples
                          chrome-extensions-samples
                          master

                          搜索帮助