Skip to content

Commit

Permalink
⚠ Breaking. Add a space in the payload. Close #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Apr 3, 2019
1 parent 184b654 commit 164aef4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/extension/background-script/CryptoService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function encryptTo(content: string, to: Person[]) {
}
publishPostAESKeyDebounce(encodeArrayBuffer(iv), stored)
}
return `Maskbook.io:🎼${str}|${signature}:||`
return `Maskbook.io: 🎼${str}|${signature}:||`
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/extension/content-script/injections/Posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const posts = new LiveSelector().querySelectorAll<HTMLDivElement>('.userContent'
const PostInspector = (props: { post: string; postBy: string; postId: string; needZip(): void }) => {
const { post, postBy, postId } = props
const type = {
encryptedPost: post.match('Maskbook.io:🎼') && post.match(':||'),
encryptedPost: post.match('🎼') && post.match(':||'),
provePost: post.match(/🔒(.+)🔒/)!,
}

Expand Down Expand Up @@ -67,7 +67,7 @@ new MutationObserverWatcher(posts)
// Click "See more" if it may be a encrypted post
{
const more = node.current.parentElement!.querySelector<HTMLSpanElement>('.see_more_link_inner')
if (more && node.current.innerText.match('Maskbook.io:🎼')) {
if (more && node.current.innerText.match(/🎼.+|/)) {
more.click()
}
}
Expand Down

0 comments on commit 164aef4

Please sign in to comment.