LukasLen / Privacy-Extension-For-WhatsApp-Web

Hides your WhatsApp messages until you hover over them.
https://pfwa.lukaslen.com
MIT License
130 stars 44 forks source link

Media Preview is blurring text replies, not only images #94

Open danielvmn opened 2 months ago

danielvmn commented 2 months ago

Describe the bug The replies of text messages are being blurred when Media Preview is enabled in the extension, it should only blur images and videos

To Reproduce Steps to reproduce the behavior:

  1. Go to the extension settings
  2. Make sure Media Preview is enabled
  3. Open a chat and look for a text reply
  4. See error

Expected behavior Text replies shouldn't be blurred

Screenshots Screenshot 2024-09-19 171421

Desktop (please complete the following information):

Whatsapp Web Version (please complete the following information):

aryomuzakki commented 2 months ago

Thanks for submitting your issue.

I don't know when i can make pull request, but here is the changes we needed to fix this issue if somebody want to make the pull request (@Tgentil maybe?)

in mediaPreview.css file, mark this as the old selector somehow

div._amk4 > ._amk6 :is(div, button)[role="button"]:not(.x13yyeie, ._ak3u, [data-js-context-icon], .x1a06ls3) /* media messages in chat panel (also quoted message and contact attachment button) */ /* for wa version before v2.3000.1016xxx */,

add this as the updated selector below

div._amk4 > ._amk6 :is(div, button)[role="button"]:not(.x13yyeie, .x1dxgm4b, .x7fhd9j, ._ak3u, ._aju3, [data-js-context-icon], .x1a06ls3) /* media messages in chat panel and contact attachment button */,
._agtn > div /* media in quoted message */,
._aju9 .x1ozewix /* icon for filename in quoted message */,
._aju9 .x1ozewix + span /* filename in quoted message */,

note that this cannot hide a video duration if quoted message is a video

after that, change other related file (noDelay.css and unblurActive.css)