[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to support WhatsApp Version 2.3000.xx #66

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

aryomuzakki
Copy link
Collaborator

Update the selectors to support WhatsApp Version 2.3000.1012572464

Tested in my local development environment:
Browser : Brave v1.64.113 with Chromium v123.0.6312.86
OS: Windows 10 22H2 64Bit Build 19045.4170

This should close issue #56 #57 #60 #62 #64 and #65
And after rough checking, this should blur more compared to pull request #61 and #63

Changes :

  • Fix blur for Name, Profile Pic, Messages Preview, Messages, Media Preview, Media Gallery and Text Input.
  • Move media send preview selectors from mediaGallery.css to mediaPreview.css
  • Exclude padding styles for chat message
  • Increase blur for mediaGallery

I leave the former selectors on purpose for version compatibility.

Dear Owner, please review soon @LukasLen , Thank You

Allow me to mention people who might need this
@Tgentil, @mclorand, @roniekas, @nikhilnk2206, @cruzy67, @Ahmed-Soli, @techsamy, @Usama171, @amithm7, @aritrakrbasu, @UsmanAhmadSaeed, @hndko, @Spacetaxfiling, @GodAnt12, @asim-hawklogix, @vvarl0cks, @satishgadhave, @MvrckTheBald, @ticmaidev, @LivreAcessoPro, @URODESUKA, @fabianodellano, @TejasMishr

@Tgentil
Copy link
Contributor
Tgentil commented Apr 8, 2024

I tested the update in this PR and found it to be solid. It successfully resolves the major issue of having to repeatedly clear the cache. It also seems to address all the issues highlighted in PR #61 effectively. Additionally, the code appears to be cleaner and better commented than in the previous PR, making it a robust solution for the extension’s functionality with WhatsApp's latest version.

@LivreAcessoPro
Copy link

image
It not works for Firefox ESR.

@TejasMishr
Copy link

@aryomuzakki Please Check it For Firefox.

@Tgentil
Copy link
Contributor
Tgentil commented Apr 9, 2024

@TejasMishr and @LivreAcessoPro

I've tested PR #66 and can confirm it works perfectly on Firefox. For those interested, to use this updated version on Firefox, you'll need to download the repository from LukasLen/Privacy-Extension-For-WhatsApp-Web. Install GitHub CLI and run gh pr checkout 66 to fetch the PR.

Due to a known issue with service workers in Firefox and the Manifest V3 update, some modifications are necessary. You can read more about this issue in these links: background.service_worker is currently disabled, W3C WebExtensions, and Manifest v3 background scripts/service worker on Firefox.

In brief, remove the chrome manifest (manifest.json) and rename manifest_firefox.json to manifest.json. This workaround should make the extension work. If you're using Firefox version lower than 120, you might need to tweak the background script setting in the manifest changing it:

From:

  "background": {
    "scripts": ["background.js"],
    "service_worker": "background.js"
  },

To:

"background": {
    "scripts": ["background.js"]
},

Then you import the manifest in Firefox through about:debugging#/runtime/this-firefox.

temporary extension

Here's a screenshot showing the extension working in Firefox:

extension working fine

Hope this helps, and let's encourage @LukasLen to merge PR #66 soon for wider availability.

@aryomuzakki
Copy link
Collaborator Author

Sorry I haven't got the chance for testing in firefox.
Thank you @Tgentil for testing and checking the code, also thanks for your helpful guide.

@guisithos
Copy link

@TejasMishr and @LivreAcessoPro

I've tested PR #66 and can confirm it works perfectly on Firefox. For those interested, to use this updated version on Firefox, you'll need to download the repository from LukasLen/Privacy-Extension-For-WhatsApp-Web. Install GitHub CLI and run gh pr checkout 66 to fetch the PR.

Firefox 124.0.2, working flawless doing as described by @Tgentil

Copy link
Contributor
@Tgentil Tgentil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is working perfectly, effectively resolving the issues raised in issues #56, #57, #60, #62, #64, and #65. Moreover, it surpasses the issues in PRs #61 and #63 with clean, well-commented code and a concern for version compatibility. The extension is performing flawlessly on both Chrome and Firefox.

@LukasLen LukasLen changed the base branch from master to v3.2.0 April 11, 2024 11:50
@LukasLen
Copy link
Owner

I just tested this PR and moving forward with this change for version 3.2.0. Thanks for contributing!
This essentially resolves #56, #57, #60, #62, #64, #65. I am also closing #61 and #63.

@LivreAcessoPro
Copy link
LivreAcessoPro commented Apr 15, 2024

Houve um erro ao instalar a extensão temporária.
Detalhes do erro

Add-on contact@lukaslen.com is not compatible with application version. add-on minVersion: 121.0.

Minversion changed to "115".

Still not working on Firefox ESR 115.9.1esr (64-bits)

@Tgentil
Copy link
Contributor
Tgentil commented Apr 15, 2024

Houve um erro ao instalar a extensão temporária. Detalhes do erro

Add-on contact@lukaslen.com is not compatible with application version. add-on minVersion: 121.0.

Minversion changed to "115".

Still not working on Firefox ESR 115.9.1esr (64-bits)

@LivreAcessoPro, please download the update version 3.2.0 on the Firefox Add-ons Store: Updated Version. it should fix your problem.

@mclorand
Copy link

I just tested this PR and moving forward with this change for version 3.2.0. Thanks for contributing! This essentially resolves #56, #57, #60, #62, #64, #65. I am also closing #61 and #63.

Plugin works now, thanks

@ticmaisdev
Copy link

@LivreAcessoPro have you tried clicking on the extension icon? firefox won't enable the extension, unless you'll click on the icon

@Tgentil
Copy link
Contributor
Tgentil commented Apr 16, 2024

@LivreAcessoPro, it seems like the issue might be due to your Firefox ESR version (115.9.1esr) not supporting service workers of the new Manifest V3, which is needed for the extension to function properly. Firefox added support for Manifest V3 service workers starting from version 120. Upgrading to a newer version of Firefox might resolve the compatibility issue. You can read more about these limitations and their solutions in the Firefox documentation and community discussions.

@LivreAcessoPro
Copy link

@

@LivreAcessoPro, it seems like the issue might be due to your Firefox ESR version (115.9.1esr) not supporting service workers of the new Manifest V3, which is needed for the extension to function properly. Firefox added support for Manifest V3 service workers starting from version 120. Upgrading to a newer version of Firefox might resolve the compatibility issue. You can read more about these limitations and their solutions in the Firefox documentation and community discussions.

A managed to make it work, partially, Firefox ESR version (115.9.1esr). I removed the worker part, and downgraded the version number.
The blur taken action on the message panel, but not on the left panel.

@aryomuzakki
Copy link
Collaborator Author
aryomuzakki commented Apr 18, 2024

@LivreAcessoPro , yeah, I remove service_worker option, then change or remove strict_min_version option too.
I also use this step, sorry I forgot if this required or not.

  1. Enter about:config in your address bar, and continue to the list of preferences.
  2. Find the xpinstall.signatures.required preference and set it to false.

source https://support.mozilla.org/en-US/kb/install-system-add-ons-firefox-enterprise

This make extension work in my local,
Firefox ESR v115.9.1esr
WA v2.3000.1012868116
Windows 10 22H2 64Bit Build 19045.4170

image

All the blurs are working

image

can you provide a screenshot for which part are not bluring?

@LivreAcessoPro
Copy link

Done:
Captura de tela de 2024-04-19 17-10-02

@LivreAcessoPro
Copy link
{
  "manifest_version": 3,
  "default_locale": "en",
  "name": "__MSG_extensionName__",
  "description": "__MSG_extensionDescription__",
  "version": "3.2.0",
  "action": {
    "default_title": "__MSG_extensionName__",
    "default_popup": "popup/popup.html",
    "default_icon": {
      "16": "images/icon16.png",
      "24": "images/icon24.png",
      "32": "images/icon32.png"
    }
  },
  "icons": {
    "16": "images/icon16.png",
    "32": "images/icon32.png",
    "48": "images/icon48.png",
    "128": "images/icon128.png"
  },
  "permissions": [
    "storage"
  ],
  "host_permissions": [
    "https://web.whatsapp.com/*"
  ],
  "background": {
    "scripts": [
      "background.js"
    ]
  },
  "browser_specific_settings": {
    "gecko": {
      "id": "contact@lukaslen.com",
      "strict_min_version": "115.0"
    }
  },
  "content_scripts": [
    {
      "matches": [
        "https://web.whatsapp.com/*"
      ],
      "js": [
        "scripts/contentScript.js"
      ]
    }
  ],
  "web_accessible_resources": [
    {
      "resources": [
        "images/statusOn.png",
        "images/statusOff.png",
        "css/messages.css",
        "css/messagesPreview.css",
        "css/mediaPreview.css",
        "css/mediaGallery.css",
        "css/textInput.css",
        "css/profilePic.css",
        "css/name.css",
        "css/noDelay.css",
        "css/unblurActive.css"
      ],
      "matches": [
        "https://web.whatsapp.com/*"
      ]
    }
  ],
  "commands": {
    "toggle": {
      "suggested_key": {
        "default": "Alt+X"
      },
      "description": "Toggle On/Off"
    }
  }
}

@LivreAcessoPro
Copy link

Done: Captura de tela de 2024-04-19 17-10-02

After reloading Firefox ESR, it's working. Thanks, @aryomuzakki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants