-
-
Save radosinsky/cb35cd159ac66e2d5242cdc7f57a14db to your computer and use it in GitHub Desktop.
crx-page-title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const title = "Inactive Tab"; | |
function changeDocumentTitle(documentTitle) { | |
document.title = documentTitle; | |
} | |
chrome.tabs.query({ active: false }, tabs => { | |
tabs.forEach(tab => { | |
if (!tab.url.startsWith('chrome://')) { | |
chrome.scripting.executeScript({ | |
target: { tabId: tab.id }, | |
func: changeDocumentTitle, | |
args: [title] | |
}); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Page Title Changer", | |
"description": "Changes Title of All Inactive Tabs", | |
"version": "1.0", | |
"manifest_version": 3, | |
"background": { | |
"service_worker": "background.js" | |
}, | |
"permissions": [ | |
"scripting", | |
"tabs" | |
], | |
"host_permissions": [ | |
"<all_urls>" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment