mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Misc formatting/import changes
This commit is contained in:
@@ -44,13 +44,9 @@ const decodeTransform = new DecodeTransform();
|
||||
const encodeTransform = new EncodeTransform();
|
||||
|
||||
// stdin -> stdout
|
||||
process.stdin
|
||||
.pipe(decodeTransform)
|
||||
|
||||
process.stdin.pipe(decodeTransform)
|
||||
decodeTransform.on("data", handleMessage);
|
||||
|
||||
encodeTransform
|
||||
.pipe(process.stdout);
|
||||
encodeTransform.pipe(process.stdout);
|
||||
|
||||
/**
|
||||
* Encode and send a message to the extension. If message is
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
import defaultOptions from "./defaultOptions";
|
||||
import bridge from "./lib/bridge";
|
||||
import loadSender from "./lib/loadSender";
|
||||
import options, { Options } from "./lib/options";
|
||||
|
||||
@@ -13,8 +12,7 @@ import { Message } from "./types";
|
||||
import { CAST_FRAMEWORK_LOADER_SCRIPT_URL
|
||||
, CAST_LOADER_SCRIPT_URL } from "./lib/endpoints";
|
||||
|
||||
import { ReceiverSelection
|
||||
, ReceiverSelectorMediaType } from "./background/receiverSelector";
|
||||
import { ReceiverSelectorMediaType } from "./background/receiverSelector";
|
||||
|
||||
import ReceiverSelectorManager
|
||||
from "./background/receiverSelector/ReceiverSelectorManager";
|
||||
@@ -73,11 +71,13 @@ function initBrowserAction () {
|
||||
browser.browserAction.onClicked.addListener(async tab => {
|
||||
const selection = await ReceiverSelectorManager.getSelection();
|
||||
|
||||
loadSender({
|
||||
tabId: tab.id
|
||||
, frameId: 0
|
||||
, selection
|
||||
});
|
||||
if (selection) {
|
||||
loadSender({
|
||||
tabId: tab.id
|
||||
, frameId: 0
|
||||
, selection
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user