commit
447f921b33
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Do Not Consent",
|
"name": "Do Not Consent",
|
||||||
"version": "4.1.1",
|
"version": "4.1.2",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_appDesc__",
|
"description": "__MSG_appDesc__",
|
||||||
"icons": {
|
"icons": {
|
||||||
|
@ -209,7 +209,14 @@ const updateState = (tabId, state) => {
|
|||||||
|
|
||||||
chrome.runtime.onMessage.addListener((request, sender, responseCallback) => {
|
chrome.runtime.onMessage.addListener((request, sender, responseCallback) => {
|
||||||
const hasPermission = !sender.frameId || sender.frameId === 0;
|
const hasPermission = !sender.frameId || sender.frameId === 0;
|
||||||
const tabId = sender.tab.id;
|
let tabId = sender.tab ? sender.tab.id : undefined;
|
||||||
|
|
||||||
|
if (!tabId) {
|
||||||
|
chrome.tabs.query(
|
||||||
|
{ active: true, currentWindow: true },
|
||||||
|
(tabs) => (tabId = tabs[0] ? tabs[0].id : 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
switch (request.type) {
|
switch (request.type) {
|
||||||
case "DISABLE_ICON":
|
case "DISABLE_ICON":
|
||||||
|
Loading…
Reference in New Issue
Block a user