diff --git a/manifest.json b/manifest.json index 51149fa..af72d91 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Cleaner Twitter", "description": "Make Twitter UI cleaner by removing annoying pieces.", - "version": "0.3.3", + "version": "0.3.4", "action": { "default_popup": "popup/popup.html", "default_icon": { diff --git a/src/service_workers/background.js b/src/service_workers/background.js index 0d603a0..ecdf8cc 100644 --- a/src/service_workers/background.js +++ b/src/service_workers/background.js @@ -4,11 +4,11 @@ import { updateDefaultCSSRules } from "../utils/defaultRulesUpdate.js"; chrome.webNavigation.onCommitted.addListener(async () => { await updateDefaultCSSRules() }, - { url: [{ urlMatches: 'https://*.twitter.com/*' }] + { url: [{ urlMatches: 'https://*.twitter.com/*' }, { urlMatches: 'https://*.x.com/*' }] }) chrome.runtime.onInstalled.addListener(async () => { - const openTwitterTabs = await chrome.tabs.query({ url: 'https://*.twitter.com/*' }) + const openTwitterTabs = await chrome.tabs.query({ url: ['https://*.twitter.com/*', 'https://*.x.com/*'] }) const versionInStorage = await chrome.storage.sync.get('version') const foundVersionInStorage = Object.keys(versionInStorage).length === 1 @@ -100,7 +100,7 @@ function getRulesThatChangedState(oldValue, newValue) { * @param {message} messageObj - The message to send. */ async function sendMessageToTwitterTabs(messageObj) { - const tabs = await chrome.tabs.query({ url: 'https://*.twitter.com/*' }) + const tabs = await chrome.tabs.query({ url: ['https://*.twitter.com/*', 'https://*.x.com/*'] }) tabs.forEach(async tab => { await chrome.tabs.sendMessage(tab.id, { [messageObj.name]: messageObj.active,