-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3370 from amitsingh-007/f-improvements
- Loading branch information
Showing
97 changed files
with
1,009 additions
and
1,234 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
File renamed without changes.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { getWebistes } from '@/helpers/fetchFromStorage'; | ||
|
||
export const isForumPage = async (hostname: string) => { | ||
const websites = await getWebistes(); | ||
return Object.values(websites).some((website) => hostname.includes(website)); | ||
}; |
21 changes: 21 additions & 0 deletions
21
apps/extension/src/BackgroundScript/websites/storageSync.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { trpcApi } from '@/apis/trpcApi'; | ||
import { IWebsites, STORAGE_KEYS } from '@bypass/shared'; | ||
|
||
const getDecodedWebsites = (encodedWebsites: IWebsites) => { | ||
return Object.entries(encodedWebsites).reduce((acc, [key, value]) => { | ||
return { | ||
...acc, | ||
[key]: decodeURIComponent(atob(value)), | ||
}; | ||
}, {}); | ||
}; | ||
|
||
export const syncWebsitesToStorage = async () => { | ||
const response = await trpcApi.firebaseData.websitesGet.query(); | ||
const websitesData = getDecodedWebsites(response); | ||
await chrome.storage.local.set({ [STORAGE_KEYS.websites]: websitesData }); | ||
}; | ||
|
||
export const resetWebsites = async () => { | ||
await chrome.storage.local.remove(STORAGE_KEYS.websites); | ||
}; |
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
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
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
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
Oops, something went wrong.
9290f6f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for bypass-links ready!
✅ Preview
https://bypass-links-cmk6nehpb-amit-singhs-projects-c621efdb.vercel.app
Built with commit 9290f6f.
This pull request is being automatically deployed with vercel-action