Remove domPolicy logging when debugging is off.

This commit is contained in:
hackademix 2020-10-09 09:23:47 +02:00
parent 301bcd2c16
commit 16f796fed8
1 changed files with 2 additions and 1 deletions

View File

@ -556,6 +556,7 @@ var RequestGuard = (() => {
try {
let policy = ns.computeChildPolicy({url}, {tab: {id: tabId}, frameId});
policy.navigationURL = url;
let debugStatement = ns.local.debug ? 'console.debug("domPolicy", domPolicy);' : '';
let ret = await browser.tabs.executeScript(details.tabId, {
code:
`{
@ -571,7 +572,7 @@ var RequestGuard = (() => {
} else {
ns = {domPolicy}
}
console.debug("domPolicy", domPolicy);
${debugStatement}
}
ns;`,
runAt: "document_start",