Skip to content

Commit

Permalink
🧑‍💻 네이밍 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
이재민 committed Jan 27, 2024
1 parent 6f72e72 commit 845b84f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/tabs/tab-list.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
queryFn: () => chromeApi.getTabs()
});
const excludedPatterns = [
const googleServicesUrl = [
'https://chromewebstore.google.com/*',
'https://chrome.google.com/webstore/*',
'https://accounts.google.com/*',
'https://search.google.com/search-console*',
'https://analytics.google.com/analytics/*'
];
const isExcludedUrl = (url: string) => {
return excludedPatterns.some((pattern) => {
const isGoogleService = (url: string) => {
return googleServicesUrl.some((pattern) => {
// Convert the '*' in the pattern to '.*' in the regex.
const regexPattern = pattern.replace(/\*/g, '.*');
const regex = new RegExp(regexPattern);
Expand All @@ -46,7 +46,7 @@
</Command.Empty>
<Command.Group heading={getLocalMessage('tabs')}>
{#each $tabs.data as tab (tab.id)}
<TabItem {tab} isDisabled={isSyncing || isExcludedUrl(tab.url ?? '')} />
<TabItem {tab} isDisabled={isSyncing || isGoogleService(tab.url ?? '')} />
{/each}
</Command.Group>
{:else}
Expand Down

0 comments on commit 845b84f

Please sign in to comment.