Skip to content

Commit 8204ae8

Browse files
authored
Update background.js
1 parent 2ed03c0 commit 8204ae8

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

background.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ var state = {};
55
const resumelimit = 5;
66
const setItems = ['media','backgroundaudio', 'otherTabs', 'mutedTabs', 'ignoredTabs', 'mutedMedia', 'legacyMedia'];
77

8-
// This is a list of places where it doesn't make sense to inject scripts.
9-
// Improves performance by not running pointless code and security if the content script has a logic issue, Ideally the extension wont have permission in the first place.
10-
// Microsoft (Microsoft Identity, Outlook), Proton (Account, Mail), Google (TIER0)
11-
const excludeMatches = ['https://outlook.office365.com/*','https://outlook.office.com/*','https://outlook.live.com/*','https://outlook.com/*','https://provisioningapi.microsoftonline.com/*','https://api.mysignins.microsoft.com/*','https://adminwebservice.microsoftonline.com/*','https://graph.microsoft.com/*','https://login.windows.net/*','https://login.microsoftonline.com/*','https://login.live.com/*','https://account.live.com/*','https://signup.live.com/*','https://account.windowsazure.com/*','https://account.activedirectory.windowsazure.com/*','https://credential.activedirectory.windowsazure.com/*','https://passwordreset.microsoftonline.com/*','https://mail.proton.me/*','https://account.proton.me/*','https://mail.protonmail.com/*','https://account.protonmail.com/*','https://flash.android.com/*','https://accounts.google.com/*','https://console.actions.google.com/*','https://admin.google.com/*','https://bard.google.com/*','https://chrome.google.com/*','https://chromewebstore.google.com/*','https://clients6.google.com/*','https://console.cloud.google.com/*','https://console-secure.cloud.google.com/*','https://ide.cloud.google.com/*','https://shell.cloud.google.com/*','https://ssh.cloud.google.com/*','https://ssh-secure.cloud.google.com/*','https://cloudsearch.google.com/*','https://cloudssh.developers.google.com/*','https://console.developers.google.com/*','https://ediscovery.google.com/*','https://fi.google.com/*','https://console.firebase.google.com/*','https://gemini.google.com/*','https://inbox.google.com/*','https://issuetracker.google.com/*','https://mail.google.com/*','https://mail-settings.google.com/*','https://meet.google.com/*','https://myaccount.google.com/*','https://passwords.google.com/*','https://play.google.com/*','https://remotedesktop.google.com/*','https://script.google.com/*','https://takeout.google.com/*','https://vault.google.com/*','https://googleacquisitionmigration.com/*','https://bugs.chromium.org/*','https://g-issues.chromium.org/*','https://issues.chromium.org/*']
12-
138
async function save() {
149
let temp = Object.assign({}, state);
1510
for (let value of setItems) {
@@ -512,15 +507,13 @@ async function updateContentScripts() {
512507
id: 'ContentScript',
513508
js: ['ContentScript.js'],
514509
matches: p.origins,
515-
excludeMatches: excludeMatches,
516510
allFrames: true,
517511
matchOriginAsFallback: true,
518512
runAt: 'document_start'
519513
}, {
520514
id: 'WindowScript',
521515
js: ['WindowScript.js'],
522516
matches: p.origins,
523-
excludeMatches: excludeMatches,
524517
allFrames: true,
525518
runAt: 'document_start',
526519
world: 'MAIN'
@@ -533,10 +526,6 @@ async function updateExtensionScripts() {
533526
const tabs = await chrome.tabs.query({});
534527
tabs.forEach(async tab => {
535528
if (!tab.url || !tab.id) return;
536-
for (let match of excludeMatches) {
537-
// Not perfect, url may change and support for matchs is limited.
538-
if (tab.url.startsWith(match.split('*')[0])) return;
539-
}
540529
chrome.tabs.sendMessage(tab.id, {type: 'hi ya!'}).catch(async () => {
541530
await chrome.scripting.executeScript({
542531
target: {

0 commit comments

Comments
 (0)