Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
+ YouTubeに対応, Module名変更
+ READMEを分かりやすく加筆
* On/Off画面の実装
  • Loading branch information
GenbuHase committed Feb 4, 2020
1 parent 993ab84 commit bce09d3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ This extension enables your [Bouyomi-chan] to read aloud automatically on some s
## Installation
Make sure to install [a WebSocket Plugin for Bouyomi-chan](https://github.com/chocoa/BouyomiChan-WebSocket-Plugin) before using Bouyomi-Launcher.

1. Download one from this repository and unpack.
1. Download one from this repository and unpack.

2. Turn on `Developer Mode` from `chrome://extensions`.
2. Turn on `Developer Mode` from `chrome://extensions`.

3. Import one by selecting unpacked folder.<Br />
3. Import one by selecting unpacked folder.<Br />
![chrome://extensions](https://user-images.githubusercontent.com/14960841/73714728-b37fdb00-4709-11ea-9c8d-5280f77d39fa.png)


## Implemented Services
* YouTube Live
* ### YouTube (https://www.youtube.com/live_chat)
* ### YouTube Live (https://studio.youtube.com/channel/{:id}/livestreaming/dashboard)
※ Available on latest-UI


## LICENSE
Expand Down
12 changes: 7 additions & 5 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@
いくつかのサービスにおいて、[棒読みちゃん]が自動的に読み上げるようになります。


## Languages
## 他言語のREADME
* [英語 (English)](/README.md)


## 導入方法
ご利用の前に、必ず[WebSocketプラグイン](https://github.com/chocoa/BouyomiChan-WebSocket-Plugin)を導入してください。

1. このレポジトリから棒読みランチャーをダウンロードし、解凍します。
1. このレポジトリから棒読みランチャーをダウンロードし、解凍します。

2. `chrome://extensions`から`デベロッパーモード`を有効にします。
2. `chrome://extensions`から`デベロッパーモード`を有効にします。

3. `パッケージされていない拡張機能を読み込む`より、解凍されたフォルダを参照しインストールします。<Br />
3. `パッケージされていない拡張機能を読み込む`より、解凍されたフォルダを参照しインストールします。<Br />
![chrome://extensions](https://user-images.githubusercontent.com/14960841/73714728-b37fdb00-4709-11ea-9c8d-5280f77d39fa.png)


## 実装済みのサービス
* YouTube Live
* ### YouTube (https://www.youtube.com/live_chat)
* ### YouTube Live (https://studio.youtube.com/channel/{:id}/livestreaming/dashboard)
※ 現行のUIで有効


## ライセンス
Expand Down
11 changes: 8 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
"manifest_version": 2,
"name": "棒読みランチャー",
"description": "棒読みちゃんに自動読み上げさせるChrome拡張機能",
"version": "1.0.0",
"version": "1.0.1",

"content_scripts": [
{
"matches": ["*://studio.youtube.com/channel/*/livestreaming/*"],
"js": ["modules/YouTube-Live.js"],
"matches": [
"*://www.youtube.com/live_chat*",
"*://studio.youtube.com/channel/*/livestreaming/dashboard*"
],

"js": ["modules/YouTube.js"],

"all_frames": true,
"run_at": "document_idle"
}
]
Expand Down
4 changes: 4 additions & 0 deletions modules/YouTube-Live.js → modules/YouTube.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const BOUYOMI_SOCKET_URL = "ws://localhost:50002";
*/
const sendMessageToSocket = (message, config = {}) => {
const bouyomi = new WebSocket(BOUYOMI_SOCKET_URL);
bouyomi.addEventListener("error", () => { throw new Error("Couldn't connect to Bouyomi-chan's socket server") });

bouyomi.addEventListener("open", () => {
bouyomi.send([
config.speed !== undefined ? config.speed : -1,
Expand Down Expand Up @@ -45,6 +47,8 @@ const sanitizeChatMessage = messageElement => {


(() => {
console.info("[Bouyomi Launcher] Launched");

const observer = new MutationObserver(mutations => {
for (const mutation of mutations) {
if (mutation.type !== "childList") return;
Expand Down

0 comments on commit bce09d3

Please sign in to comment.