Remove some console.log statements
This commit is contained in:
parent
a2e2009ff7
commit
95e0c0a93a
@ -23,7 +23,6 @@ browser.menus.onClicked.addListener(async (info, tab) => {
|
|||||||
const target = { "tabId": tab.id };
|
const target = { "tabId": tab.id };
|
||||||
try {
|
try {
|
||||||
const url = await browser.sessions.getTabValue(tab.id, "provenance");
|
const url = await browser.sessions.getTabValue(tab.id, "provenance");
|
||||||
console.log(`URL: ${url}`);
|
|
||||||
const alertMsg = (typeof url === "undefined") ? "No opening url found" : `This tab was opened by: ${url}`;
|
const alertMsg = (typeof url === "undefined") ? "No opening url found" : `This tab was opened by: ${url}`;
|
||||||
|
|
||||||
const func = (alertMsg) => {
|
const func = (alertMsg) => {
|
||||||
@ -31,11 +30,7 @@ browser.menus.onClicked.addListener(async (info, tab) => {
|
|||||||
};
|
};
|
||||||
const args = [alertMsg];
|
const args = [alertMsg];
|
||||||
const injectionResult = await browser.scripting.executeScript({target, args, func});
|
const injectionResult = await browser.scripting.executeScript({target, args, func});
|
||||||
|
|
||||||
console.log(injectionResult);
|
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
|
||||||
await browser.scripting.executeScript({func: () => { alert("Tab not found"); }, target});
|
await browser.scripting.executeScript({func: () => { alert("Tab not found"); }, target});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user