Skip to content

Commit

Permalink
fix: bugfix for update permission on installed (#11644)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuanyang233 committed May 23, 2024
1 parent e0f0d92 commit 7d35800
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/mask/popups/pages/Personas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ const Persona = memo(() => {
useAsync(async () => {
const groups = await Services.SiteAdaptor.getOriginsWithoutPermission()
const origins = groups.flatMap((x) => x.origins)
if (origins.some((x) => x === 'https://mobile.x.com/*' || x === 'https://x.com/*'))

if (origins.every((x) => x === 'https://www.x.com/*' || x === 'https://x.com/*')) {
modalNavigate(PopupModalRoutes.UpdatePermissions)
}
}, [])

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EnhanceableSite } from '@masknet/shared-base'
import type { SiteAdaptor } from '../types.js'

const origins = ['https://mobile.twitter.com/*', 'https://twitter.com/*', 'https://mobile.x.com/*', 'https://x.com/*']
const origins = ['https://mobile.twitter.com/*', 'https://twitter.com/*', 'https://www.x.com/*', 'https://x.com/*']
export const TwitterAdaptor: SiteAdaptor.Definition = {
name: 'X',
networkIdentifier: EnhanceableSite.Twitter,
Expand Down

0 comments on commit 7d35800

Please sign in to comment.