mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Minor code review
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1992
This commit is contained in:
parent
bba4732c6b
commit
60072e7996
@ -864,9 +864,9 @@ vAPI.messaging = {
|
|||||||
const { origin, tab, url } = sender;
|
const { origin, tab, url } = sender;
|
||||||
portDetails.frameId = sender.frameId;
|
portDetails.frameId = sender.frameId;
|
||||||
portDetails.frameURL = url;
|
portDetails.frameURL = url;
|
||||||
portDetails.privileged =
|
portDetails.privileged = origin !== undefined
|
||||||
origin !== undefined && origin === this.PRIVILEGED_ORIGIN ||
|
? origin === this.PRIVILEGED_ORIGIN
|
||||||
origin === undefined && url.startsWith(this.PRIVILEGED_ORIGIN);
|
: url.startsWith(this.PRIVILEGED_ORIGIN);
|
||||||
if ( tab ) {
|
if ( tab ) {
|
||||||
portDetails.tabId = tab.id;
|
portDetails.tabId = tab.id;
|
||||||
portDetails.tabURL = tab.url;
|
portDetails.tabURL = tab.url;
|
||||||
|
Loading…
Reference in New Issue
Block a user