From 95b7be49219e107d168070ef13708003184e33ab Mon Sep 17 00:00:00 2001 From: TheFantasticWarrior <39485135+TheFantasticWarrior@users.noreply.github.com> Date: Tue, 18 Apr 2023 12:56:46 +0800 Subject: [PATCH] chrome icon click now toggles --- src/js/background.js | 3 +-- src/manifest.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/js/background.js b/src/js/background.js index c01c178..97dfd3b 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -768,7 +768,6 @@ cfg.migrateOldStorage( } ); chrome.browserAction.onClicked.addListener((a, b) => { - if(typeof b==="undefined")chrome.runtime.openOptionsPage(); - else if (b&&b.modifiers.length) chrome.runtime.openOptionsPage(); + if (b&&b.modifiers.length) chrome.runtime.openOptionsPage(); else chrome.tabs.sendMessage(a.id, "disable"); }); diff --git a/src/manifest.json b/src/manifest.json index 3ddf56c..a2a6ded 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -36,7 +36,7 @@ "128": "icon.png", "18": "icon-18.png" }, - "default_title": "Imagus mod v0.10.9.1\nclick to toggle on/off(Firefox)\nshift click to open options page(Firefox)\nclick to open options page(Chrome)" + "default_title": "Imagus mod v0.10.9.1\nclick to toggle on/off\nshift click to open options page(Firefox)" }, "icons": { "128": "icon.png",