mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-10 17:49:58 +00:00
Replace webpack with esbuild
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"extensionName": {
|
||||
"message": "EXTENSION_NAME"
|
||||
"message": "fx_cast"
|
||||
, "description": "Name of the extension and the native receiver selector window title."
|
||||
}
|
||||
, "extensionDescription": {
|
||||
|
||||
@@ -144,7 +144,7 @@ browser.menus.onClicked.addListener(async (info, tab) => {
|
||||
});
|
||||
|
||||
await browser.tabs.executeScript(tab.id, {
|
||||
file: "senders/media/bundle.js"
|
||||
file: "senders/media/index.js"
|
||||
, frameId: info.frameId
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -178,7 +178,7 @@ async function onBeforeCastSDKRequest(details: OnBeforeRequestDetails) {
|
||||
});
|
||||
|
||||
return {
|
||||
redirectUrl: browser.runtime.getURL("shim/bundle.js")
|
||||
redirectUrl: browser.runtime.getURL("shim/index.js")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Options } from "./lib/options";
|
||||
|
||||
|
||||
export default {
|
||||
bridgeApplicationName: APPLICATION_NAME
|
||||
bridgeApplicationName: BRIDGE_NAME
|
||||
, bridgeBackupEnabled: false
|
||||
, bridgeBackupHost: "localhost"
|
||||
, bridgeBackupPort: 9556
|
||||
|
||||
6
ext/src/global.d.ts
vendored
6
ext/src/global.d.ts
vendored
@@ -1,8 +1,6 @@
|
||||
// Define replacement types
|
||||
declare const BRIDGE_VERSION: string;
|
||||
declare const BRIDGE_NAME: string;
|
||||
declare const MIRRORING_APP_ID: string;
|
||||
declare const APPLICATION_NAME: string;
|
||||
declare const APPLICATION_VERSION: string;
|
||||
|
||||
|
||||
declare type Nullable<T> = T | null;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ const getInfo = () => new Promise<BridgeInfo>(async (resolve, reject) => {
|
||||
|
||||
// Print compatibility info to console
|
||||
if (!isVersionCompatible) {
|
||||
logger.error(`Expecting ${applicationName} v${APPLICATION_VERSION}, found v${applicationVersion}. ${
|
||||
logger.error(`Expecting ${applicationName} v${BRIDGE_VERSION}, found v${applicationVersion}. ${
|
||||
isVersionOlder
|
||||
? "Try updating the native app to the latest version."
|
||||
: "Try updating the extension to the latest version"}`);
|
||||
@@ -110,7 +110,7 @@ const getInfo = () => new Promise<BridgeInfo>(async (resolve, reject) => {
|
||||
resolve({
|
||||
name: applicationName
|
||||
, version: applicationVersion
|
||||
, expectedVersion: APPLICATION_VERSION
|
||||
, expectedVersion: BRIDGE_VERSION
|
||||
|
||||
// Version info
|
||||
, isVersionExact
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "__MSG_extensionName__"
|
||||
, "description": "__MSG_extensionDescription__"
|
||||
, "version": "EXTENSION_VERSION"
|
||||
, "version": "0.1.2"
|
||||
, "developer": {
|
||||
"name": "AUTHOR"
|
||||
, "url": "AUTHOR_HOMEPAGE"
|
||||
"name": "Matt Hensman"
|
||||
, "url": "https://matt.tf/"
|
||||
}
|
||||
|
||||
, "applications": {
|
||||
"gecko": {
|
||||
"id": "EXTENSION_ID"
|
||||
"id": "fx_cast@matt.tf"
|
||||
, "strict_min_version": "64.0"
|
||||
, "update_url": "https://hensm.github.io/fx_cast/updates.json"
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
, "background": {
|
||||
"scripts": [ "background.js" ]
|
||||
"scripts": [ "background/background.js" ]
|
||||
}
|
||||
|
||||
, "content_scripts": [
|
||||
@@ -39,7 +39,6 @@
|
||||
}
|
||||
]
|
||||
|
||||
, "content_security_policy": "CONTENT_SECURITY_POLICY"
|
||||
, "default_locale": "en"
|
||||
|
||||
, "icons": {
|
||||
@@ -66,7 +65,7 @@
|
||||
, "<all_urls>"
|
||||
]
|
||||
, "web_accessible_resources": [
|
||||
"shim/bundle.js"
|
||||
"shim/index.js"
|
||||
, "senders/media/overlay/overlayContent.js"
|
||||
, "senders/media/overlay/AirPlay_Audio.svg"
|
||||
, "senders/media/overlay/AirPlay_Video.svg"
|
||||
|
||||
@@ -133,8 +133,8 @@ class OptionsApp extends Component<
|
||||
return (
|
||||
<div>
|
||||
<form id="form" ref={ form => { this.form = form; }}
|
||||
onSubmit={ this.handleFormSubmit }
|
||||
onChange={ this.handleFormChange }>
|
||||
onSubmit={ this.handleFormSubmit }
|
||||
onChange={ this.handleFormChange }>
|
||||
|
||||
<Bridge info={ this.state.bridgeInfo }
|
||||
loading={ this.state.bridgeLoading }
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<link rel="stylesheet" href="../photon-colors.css">
|
||||
<link rel="stylesheet" href="../photon-widgets.css">
|
||||
<link rel="stylesheet" href="styles/index.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user