Skip to content

Commit

Permalink
🐛 change the opacity of the lock status for distinguish between fake …
Browse files Browse the repository at this point in the history
…messages
  • Loading branch information
mostafa-kheibary committed May 4, 2024
1 parent 47be036 commit 7ee4aa0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/content/scripts/messageParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ export const parseMessage = async (urlStore: Url, message: Element, messages: El
changeTextNode(target, "Parsing ...");
try {
const packet = await cipher.resolveDRSAP(textNodeContent);
if (!packet) changeTextNode(target, "⛔ Error in decryption");
else changeTextNode(target, "🔒" + packet);
if (!packet) {
changeTextNode(target, "⛔ Error in decryption");
} else {
const status = document.createElement("span");
status.textContent = "🔒 ";
status.style.opacity = "0.4";
changeTextNode(target, packet);
target.prepend(status);
}
(target as any).dir = "auto";
} catch (error) {
changeTextNode(target, "⛔ Error in decryption");
Expand Down

0 comments on commit 7ee4aa0

Please sign in to comment.