highlighted check is breaking pwa's; add tabid to block result
This commit is contained in:
+6
-7
@@ -157,17 +157,15 @@ export default class BackgroundMain {
|
|||||||
"result": {
|
"result": {
|
||||||
"originUrl": options.originUrl,
|
"originUrl": options.originUrl,
|
||||||
"url": options.url,
|
"url": options.url,
|
||||||
|
"tabId": options.tabId,
|
||||||
"blocked": false
|
"blocked": false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return {};
|
|
||||||
} else {
|
|
||||||
//When tab not selected, block the request
|
|
||||||
return {
|
|
||||||
cancel: true,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Allow requests when the assigned site already matches the current context,
|
||||||
|
// even if the tab is not highlighted.
|
||||||
|
return {};
|
||||||
} else {
|
} else {
|
||||||
//Only send events when tab is selected
|
//Only send events when tab is selected
|
||||||
if (tab.highlighted) {
|
if (tab.highlighted) {
|
||||||
@@ -178,6 +176,7 @@ export default class BackgroundMain {
|
|||||||
"result": {
|
"result": {
|
||||||
"originUrl": options.originUrl,
|
"originUrl": options.originUrl,
|
||||||
"url": options.url,
|
"url": options.url,
|
||||||
|
"tabId": options.tabId,
|
||||||
"blocked": true
|
"blocked": true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user