mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-13 19:09:58 +00:00
Allow overwriting sender app variables
This commit is contained in:
@@ -280,8 +280,8 @@ browser.menus.onClicked.addListener(async (info, tab) => {
|
|||||||
mirrorCastFrameId = frameId;
|
mirrorCastFrameId = frameId;
|
||||||
|
|
||||||
await browser.tabs.executeScript(tab.id, {
|
await browser.tabs.executeScript(tab.id, {
|
||||||
code: `let selectedMedia = "${info.pageUrl ? "tab" : "screen"}";
|
code: `var selectedMedia = "${info.pageUrl ? "tab" : "screen"}";
|
||||||
let FX_CAST_RECEIVER_APP_ID = "${options.mirroringAppId}";`
|
var FX_CAST_RECEIVER_APP_ID = "${options.mirroringAppId}";`
|
||||||
, frameId
|
, frameId
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -298,8 +298,8 @@ browser.menus.onClicked.addListener(async (info, tab) => {
|
|||||||
|
|
||||||
// Pass media URL to media sender app
|
// Pass media URL to media sender app
|
||||||
await browser.tabs.executeScript(tab.id, {
|
await browser.tabs.executeScript(tab.id, {
|
||||||
code: `const srcUrl = "${info.srcUrl}";
|
code: `var srcUrl = "${info.srcUrl}";
|
||||||
const targetElementId = ${info.targetElementId};`
|
var targetElementId = ${info.targetElementId};`
|
||||||
, frameId
|
, frameId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user