https://github.com/chromeos/kiosk-mode-ext
https://github.com/chromeos/kiosk-mode-ext
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chromeos/kiosk-mode-ext
- Owner: chromeos
- License: apache-2.0
- Created: 2022-02-23T18:58:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-24T18:34:24.000Z (about 3 years ago)
- Last Synced: 2024-12-27T13:46:36.688Z (5 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Kiosk Mode Extension Sample
## What is this?
This is a sample demonstrating calling kiosk APIs from an extension in kiosk mode.
## Explanation of Files
### background.js
`background.js` handles receiving calls from external websites listed in the `externally_connectable` key of the `manifest.json` file. When receiving a message, the extension then calls specific APIs that are not normally exposed on the webpage or not available to be called from a webpage, such as [restart](https://developer.chrome.com/docs/extensions/reference/runtime/#method-restart) which is only available to kiosk applications.
### manifest.json
The `manifest.json` file describes the extension and provides key metadata about the extension. One important thing to note here is the `externally_connectable` field in the manifest. This field allows websites from that wildcard location `*://chromeos.dev/*` to call the extension. We have a [sample PWA](https://chromeos.dev/) deployed to that URL currently for users that are interested in testing the extension with a PWA.
Note that you will need to replace these 2 fields in the manifest.json file accordingly to match your self hosted extension information:
- key
- version
### manifest.xmlThis is for self hosting the extension you want to test your PWA with. For more information on self hosting, the Chrome Enterprise Team has written [this document](https://docs.google.com/document/d/1pT0ZSbGdrbGvuCsVD2jjxrw-GVz-80rMS2dgkkquhTY/edit#heading=h.3cujn7pq4oul) which goes over in great detail self hosting extensions and accessing them within your organization.
Note that you will need to replace these 3 fields in the manifest.xml file accordingly to match your self hosted extension information:
- appid
- codebase
- version## Extra documentation
* [Sending messages from web pages](https://developer.chrome.com/docs/extensions/mv3/messaging/#external-webpage)
* [Managing extensions in your enterprise](https://docs.google.com/document/d/1pT0ZSbGdrbGvuCsVD2jjxrw-GVz-80rMS2dgkkquhTY/edit#)
* [Chrome Extensions](https://developer.chrome.com/docs/extensions/mv3/)