mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +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;
|
||||
|
||||
await browser.tabs.executeScript(tab.id, {
|
||||
code: `let selectedMedia = "${info.pageUrl ? "tab" : "screen"}";
|
||||
let FX_CAST_RECEIVER_APP_ID = "${options.mirroringAppId}";`
|
||||
code: `var selectedMedia = "${info.pageUrl ? "tab" : "screen"}";
|
||||
var FX_CAST_RECEIVER_APP_ID = "${options.mirroringAppId}";`
|
||||
, frameId
|
||||
});
|
||||
|
||||
@@ -298,8 +298,8 @@ browser.menus.onClicked.addListener(async (info, tab) => {
|
||||
|
||||
// Pass media URL to media sender app
|
||||
await browser.tabs.executeScript(tab.id, {
|
||||
code: `const srcUrl = "${info.srcUrl}";
|
||||
const targetElementId = ${info.targetElementId};`
|
||||
code: `var srcUrl = "${info.srcUrl}";
|
||||
var targetElementId = ${info.targetElementId};`
|
||||
, frameId
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user