-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vladislav.saifulin
committed
Oct 5, 2019
1 parent
d697464
commit 89c2399
Showing
1 changed file
with
5 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,7 @@ | ||
# chrome-extension-template | ||
### Глобальные шорткаты для Яндекс.Музыки™ | ||
|
||
## Introduction | ||
Работают при свернутом окне Chrome. | ||
|
||
This project aims to provide an easy to use boilerplate for chrome extensions, showcasing communication between its different scripts. | ||
|
||
Not all extensions will need of all scripts or all types of messaging. All code snippets are optional. Text and images should be replaced with your own. | ||
|
||
## Installation | ||
|
||
Clone the repo: | ||
|
||
``` | ||
git clone git@github.com:edrpls/chrome-extension-template.git name-of-your-project | ||
``` | ||
|
||
Set git to track your own repository instead of this one: | ||
|
||
``` | ||
git remote set-url --delete origin git@github.com:edrpls/chrome-extension-template.git # Remove old origin | ||
git remote set-url --add origin [YOUR REPO URL] # Add new origin | ||
``` | ||
|
||
Install dependencies: | ||
|
||
``` | ||
yarn install # or npm install | ||
``` | ||
|
||
## Usage | ||
|
||
To run a development server that will watch for file changes and rebuild the scripts, run: | ||
|
||
``` | ||
yarn start | ||
``` | ||
|
||
To just build the files without the development server: | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
||
Both commands will create a `dist/` directory, it will contain the built files that should be loaded into the browser or packed. | ||
|
||
## Load into Chrome | ||
|
||
To load the built files into Chrome, open [chrome://extensions/](chrome://extensions/). | ||
|
||
Enable "Developer mode" if it's not enabled yet: | ||
|
||
![Developer Mode Checkbox](assets/dev_mode.png) | ||
|
||
Click on "Load unpacked": | ||
|
||
![Load Unpacked Button](assets/load_unpacked.png) | ||
|
||
Find the `dist/` directory on your system and open it. | ||
|
||
The extension should be now at the top of the page: | ||
|
||
![Extension Loaded](assets/ext_loaded.png) | ||
|
||
## Publishing | ||
|
||
[Follow the official docs](https://developer.chrome.com/webstore/publish) to learn how to publish a Chrome extension. | ||
Please note that Google has its own process to review public extensions and using this boilerplate **does not guarantee** that the extension will pass it. Passing the review process is your responsibility! | ||
|
||
## External resources | ||
|
||
* [Sample extension built with this template](https://github.com/edrpls/social-network-alert) | ||
|
||
* [Chrome Developer Documentation](https://developer.chrome.com/extensions/devguide) | ||
|
||
* [Overview slides about Chrome Extensions](https://github.com/edrpls/chrome-extensions-what-why-how) | ||
- **Ctrl**+**Shift**+**1** Предыдущий трек | ||
- **Ctrl**+**Shift**+**2** Пауза/снять с паузы | ||
- **Ctrl**+**Shift**+**3** Следующий трек |