Allow overwriting sender app variables

This commit is contained in:
hensm
2019-01-23 15:41:52 +00:00
parent 2373880214
commit 79477fd473

View File

@@ -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
}); });