Skip to content

Commit

Permalink
Add x.com to all ulrs query/filters (#71)
Browse files Browse the repository at this point in the history
* added x.com to urls filters/query

* update to v0.3.4
  • Loading branch information
Raiquen Guidotti committed May 17, 2024
1 parent f6fee9f commit 15699e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/service_workers/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 15699e7

Please sign in to comment.