Skip to content

Commit

Permalink
fix: remove links in payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Aug 8, 2019
1 parent 7ab1e5a commit 9d549b2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ addParameters({
theme: create({
base: 'dark',
brandTitle: 'Maskbook',
brandUrl: 'https://maskbook.io/',
brandImage: 'https://maskbook.io/img/maskbook--logotype-white.png',
brandUrl: 'https://maskbook.com/',
brandImage: 'https://maskbook.com/img/maskbook--logotype-white.png',
}),
isFullscreen: false,
panelPosition: 'right',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maskbook",
"version": "1.5.2",
"version": "1.5.3",
"private": true,
"dependencies": {
"@holoflows/kit": "https://github.com/DimensionDev/holoflows-kit",
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/chrome-manifest",
"name": "Maskbook",
"version": "1.5.2",
"version": "1.5.3",
"manifest_version": 2,
"content_scripts": [
{
Expand Down Expand Up @@ -32,6 +32,6 @@
"128": "128x128.png",
"256": "256x256.png"
},
"homepage_url": "https://maskbook.io",
"homepage_url": "https://maskbook.com",
"description": "Encrypt your posts & chats on You-Know-Where. Allow only your friends to decrypt."
}
2 changes: 1 addition & 1 deletion src/extension/background-script/CryptoService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export async function encryptTo(
OthersAESKeyEncryptedMap.set(key, othersAESKeyEncrypted)

return [
`https://Maskbook.io : ${constructAlpha40({
`${constructAlpha40({
encryptedText: encryptedTextStr,
iv: ivStr,
ownersAESKeyEncrypted: ownersAESKeyStr,
Expand Down
8 changes: 6 additions & 2 deletions src/extension/content-script/injections/Posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,18 @@ new MutationObserverWatcher(posts)
.startWatch()

function zipPostLinkPreview(node: DomProxy) {
const parentEle = node.current.parentElement!
if (isMobile) {
const img = node.current.parentElement!.querySelector('a[href*="maskbook.io"]')
const img =
parentEle.querySelector('a[href*="maskbook.io"]') || parentEle.querySelector('a[href*="maskbook.com"]')
const parent = img && img.closest('section')
if (img && parent) {
parent.style.display = 'none'
}
} else {
const img = node.current.parentElement!.querySelector('a[href*="maskbook.io"] img')
const img =
parentEle.querySelector('a[href*="maskbook.io"] img') ||
parentEle.querySelector('a[href*="maskbook.com"] img')
const parent = img && img.closest('span')
if (img && parent) {
parent.style.display = 'none'
Expand Down

0 comments on commit 9d549b2

Please sign in to comment.