From 8912c182c15aa066eae6d5c176b9d7c06734c027 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Fri, 29 Nov 2024 22:59:34 -0800 Subject: [PATCH] =?UTF-8?q?Removed=20no-longer=20used=20Infinity=20action?= =?UTF-8?q?=20handler=20from=20Chrome=20msg=20listener=20=E2=86=9E=20[auto?= =?UTF-8?q?-sync=20from=20https://github.com/adamlui/ai-web-extensions]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome/extension/content.js | 1 - firefox/extension/content.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/chrome/extension/content.js b/chrome/extension/content.js index 532fd07f..c0f40fb7 100644 --- a/chrome/extension/content.js +++ b/chrome/extension/content.js @@ -18,7 +18,6 @@ chrome.runtime.onMessage.addListener(req => { if (req.action == 'notify') notify(req.msg, req.pos) else if (req.action == 'alert') siteAlert(req.title, req.msg, req.btns) - else if (req.action.startsWith('infinity')) infinity[/\.(\w+)/.exec(req.action)[1]](req.options) else if (req.action == 'syncConfigToUI') { if (req.sender == 'service-worker.js') // disable Infinity mode 1st to not transfer between tabs settings.save('infinityMode', false) diff --git a/firefox/extension/content.js b/firefox/extension/content.js index 97b2f626..1beb201d 100644 --- a/firefox/extension/content.js +++ b/firefox/extension/content.js @@ -21,8 +21,7 @@ else if (req.action == 'prompt') { const userInput = window.prompt(req.msg || 'Please enter your input:', req.defaultVal || '') sendResp({ input: userInput }) - } else if (req.action.startsWith('infinity')) infinity[/\.(\w+)/.exec(req.action)[1]](req.options) - else if (req.action == 'syncConfigToUI') { + } else if (req.action == 'syncConfigToUI') { if (req.sender == 'background.js') // disable Infinity mode 1st to not transfer between tabs settings.save('infinityMode', false) syncConfigToUI(req.options)