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

Create Privacy Badger for Microsoft Edge #1290

Closed
ghostwords opened this issue Mar 31, 2017 · 53 comments
Closed

Create Privacy Badger for Microsoft Edge #1290

ghostwords opened this issue Mar 31, 2017 · 53 comments

Comments

@ghostwords
Copy link
Member

ghostwords commented Mar 31, 2017

Splitting Edge (née Internet Explorer) support request out from #549. This should be relatively straightforward given that Edge seems to support WebExtensions. For example, see the volunteer-developed port of uBlock.

@benjaminglass1
Copy link

Microsoft seems like they're making this as easy as possible. See https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/porting-chrome-extensions

@smbm
Copy link

smbm commented Aug 15, 2017

I used the tool that benjaminglass1 mentioned above and had it up and running (although with a couple of bugs) in 10 minutes. Am now browsing away in Edge with Privacy Badger enabled (great for power consumption in Win 10)

@smbm
Copy link

smbm commented Aug 15, 2017

Someone with even a modicum of coding experience should be able to sort out the minor bugs that seem to occur pretty quickly. I'm studying for a bunch of sysadmin quals at the moment so don't have time to spearhead this myself, would happily work with someone on it to show what I've got so far though.

@smbm
Copy link

smbm commented Aug 15, 2017

Although in it's current state on my machine you need to re-enable the extension each time you restart the browser which is sub-optimal

@ocdtrekkie
Copy link

ocdtrekkie commented Aug 22, 2017

@smbm Is there any way for you to share the toolkit's output? I'm very interested in playing with this, but from the sound of it, you need to have Chrome to use it, which I do not.

Privacy Badger is my sole add-on, and I would really like to have access to it when on Edge.

@smbm
Copy link

smbm commented Aug 23, 2017

Hi @ocdtrekkie I'd be happy to. I've attached here as a .zip file. Can anyone official tell me if I should upload it to GitHub anywhere? I'm not normally a dev, more of a sysadmin so pretty new to all this.

No need for Chrome to be installed though, you download the converter from the MS Store built into Win 10, download the Privacy Badger source, point the converter at the source and let it run.

It came up with 3 or so errors when I tried to run it which meant rewriting one line of code and editing 2 others. Once these were done I could import the plugin into Edge and it worked seemingly fine, although it did have some UI oddities.

I should add that although this worked fine on my system you should proceed at your own risk etc etc.

privacybadger-master-Edgiified.zip

@ocdtrekkie
Copy link

Tried it! Thrilled to see it pretty much works. Note that I had to replace like chrome-extension:// with like a getExtensionProtocol() function before it let me try mine. It feels like it would be relatively trivial for the EFF to polish up this version and publish it, but I am not sure the process for getting that accomplished.

@smbm
Copy link

smbm commented Aug 25, 2017

Me neither. Not sure how to get in contact either. Tried hanging around on IRC but not much happened.

Glad it worked for you, shame you have to re-enable it after each launch.

@PieroFolly
Copy link

@smbm when I try to load your extension says "Manifest parsing error: Missing or malformed manifest file." I got the same issue when I tried to port it myself before you posted your file. I managed to fix the "getExtensionProtocol()" but same thing happened with the manifest file. I'm not a programmer, so I far really understand this stuff, I'm just a savy trying to get things to work. So I have no idea how to fix this. If you could give me a hand on this one would be great. Thank you.

@smbm
Copy link

smbm commented Aug 26, 2017

Did you point Edge and/or the porting utility at the src folder within privacybadger-master? That is where manifest.json is kept?

@PieroFolly
Copy link

PieroFolly commented Aug 27, 2017

@smbm Thank you! Just worked by doing that. It's funny (for me who doesn't know much), because I didn't need to do that with other imported extensions, I just pointed to the whole folder.

Btw, it's up and running on my Ms-Edge right now while I write this, but I noticed it didn't "eat" any cookies so far. I've made sure to visit the same websites that I visited using chrome when the badger used to eat a lot of bad cookies. Now, the slider is always on safe and green, even when visiting those sites that I saved the name of their cookies to compare the difference while accessing from Edge.

The big number under the badger face is kept on zero, being green colored all times and not warning me about any possible threat like it did in Chrome. Is that just an icon bug? Or is the badger not really working properly? You said you went through many bugs after ten minutes running it. I didn't, at least from my end-user point of view (no code knowledge to check deeper), but I had this flat experience that I mentioned above so far (30 minutes running it). Not sure if will come up with the same blocking experience as before in a near future, since it takes some time to track bad cookies.

I will keep you updated if it changes anything.

@smbm
Copy link

smbm commented Sep 14, 2017

Does anyone know how we can get the attention of someone more able to test the code that has been generated with a view to making an official plugin?

I tried IRC but could not get hold of anyone.

@ghostwords
Copy link
Member Author

@andresbase If we are not reasonably reachable on IRC, should we remove IRC from https://github.com/EFForg/privacybadger#get-in-touch?

@ghostwords
Copy link
Member Author

Hi everyone! Thanks for your interest in having Privacy Badger on Edge. I am not currently set up for Edge development, and it might take me a while to get going on this given everything else that's going on. Would anyone be interested in documenting the remaining issues with Privacy Badger on Edge? We could point people to an unofficial Privacy Badger for Edge fork until we get the resources to provide official support.

@smbm
Copy link

smbm commented Sep 14, 2017

Hi @ghostwords I'm in IRC at the moment and it's pretty quiet. Maybe it's because I'm on UK time and am always in during GMT/BST hours?

I will try to document any issues I find with the Edge test code as they crop up. One of the major problems is that unless it's come in from the MS Store you have to re-enable it each time you start Edge.

Where is the best place to get started, should we just continue on this Issue thread?

I'm very happy to help out where I can but am currently studying for a bunch of certs in my spare time from work so may not be able to contribute much. As it stands at the moment I probably would be able to get something into the MS Store as I am registered as a student with MS. This is not something I envisage having for long though and I definitely wouldn't want to put something out there that wasn't up to scratch.

@smbm
Copy link

smbm commented Sep 14, 2017

Sorry for the questions I'm pretty new to all this.

@ghostwords
Copy link
Member Author

It might help organize by forking Privacy Badger and using the Issues tab in that repository, following uBlock for Edge's example.

@ocdtrekkie
Copy link

@smbm I suspect why it didn't seem like it was blocking anything on Edge as @PieroFolly reported, is that it doesn't have time to learn what's tracking you when we're testing it, and I suspect, probably doesn't keep data between sessions given that you have to reenable it each time.

I would be very iffy on someone who isn't officially the right EFF team publishing Privacy Badger on the Windows Store. For one, I suspect Microsoft would reject it, but beyond that, people would assume it is official, tested to work reasonably well already, and would hold the EFF responsible if something wasn't working. In short, it should not be published unless there is reasonable confidence it works and the EFF is willing to submit it.

@ghostwords
Copy link
Member Author

@ocdtrekkie Good points. Maybe we could fork, use the fork by diligently exporting and re-importing data across browser restarts, collect issues in the fork, and then when it looks good, work on merging the fork back into the main repo?

@smbm
Copy link

smbm commented Sep 14, 2017

@ocdtrekkie Absolutely agree 100%, I wouldn't dream of posting it to MS Store as myself. Would definitely want it to be legit, in fact I myself would not download it unless it had been published by the EFF. Just offering all the resources I have to offer to the project.

When I ran it as a test extension it did seem to block stuff after a while so appeared to be functional for me. I can't remember if the blocked items persisted after having to re-enabled. I will test tonight.

I seem to remember there was some UI sketchiness, I will try to document this tonight too.

Thanks all for your time.

@andresbase
Copy link

Hi, we do check the IRC channel from time to time but there's rarely anyone there and I haven't seen anyone ask something. For the time being let's remove the IRC reference while we set up a new async channel.
You are also invited to join our bi-weekly meetings:

We have public office hours for discussing development, bugs, feature, trackers, etc. every Monday and Thursday at 11:30am PST on Jitsi video chat.

@robinhood2014
Copy link

Here's my Microsoft Edge extension prototype for Privacy Badger. I find it curious to notice that my prototype doesn't pick up any trackers at all on a test site like yahoo.com, whereas the same extension on Chrome picked up 28. Let me know what I'm doing wrong.
PrivacyBadger_EdgeExtensionPrototype.zip

@maxismangh
Copy link

Any new news regarding this?

@smbm
Copy link

smbm commented Mar 30, 2018

I still don't have time to work on this. I have personal and work stuf happening simultaneaously.

I am hoping it comes along soon though as I find Edge perfectly fine to use on a day to day basis and it's definitely good for battery life. Not having Privacy Badger is a showstopper for me though.

@DavidBurela
Copy link

This has been on the backlog for 1 year. I'd love to see this extension running in Edge. Just checking if there is anything blocking this. I can try to put a EFF team member in contact with the correct internal contact at Microsoft if there is a showstopper.

The main parts I see needing to be done here:

  1. initial port using the guide from https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/porting-chrome-extensions
  2. run the privacy badger unit tests to ensure it is working https://github.com/EFForg/privacybadger/blob/master/doc/tests.md#unit-tests
  3. Publish it onto the Microsoft Store so that users can install it https://docs.microsoft.com/en-us/microsoft-edge/extensions/getting-started

-David.
Senior Tech Evangelist, Microsoft.

@ghostwords
Copy link
Member Author

@DavidBurela What's the best way to develop for Edge on Linux and macOS?

@ocdtrekkie
Copy link

I tried to @jenmsft and @DonaSarkar on Twitter to ask if they knew anyone who could talk on Microsoft's end about it, but I realized Twitter doesn't actually let people see protected tweets that @ them. :/ Searching Twitter for Developer Advocates at Microsoft comes up with a lot of that work on Cloud, but none that apparently work with Windows.

@smbm
Copy link

smbm commented Apr 10, 2018

I tried the extension in Edge again using the latest code, made a couple of tweaks to make it work, there are still a few UI things going on but generally is all working well.

I tired to run the tests that DavidBurela linked to above and the top 3 fail but the rest pass. I'm still studying for other stuff though so don't have masses of time to sink into it at the moment. But I'd love to get involved later if I can.

One error seems to be that Edge doesn't have TextEncoder in its API: https://developer.microsoft.com/en-us/microsoft-edge/platform/catalog/?page=1&q=encoder
This might need to be reworked.

Not too sure how to proceed with 2 and 3 at this point.

Please do comment if there is anything further I can do in my current time poor state.

@spaceraccoon
Copy link

Hey folks,

I've gone through the code a little more (beyond using the toolkit) and am passing all but one test.

  1. To add TextEncoder support (as pointed out by @smbm , I used Mozilla's polyfill and put it in utils.js.
  2. Another problem was that Privacybadger compares the SHA1 hash of the Do Not Track policy to verify it, but edge has deprecated SHA1. So I simply replaced the SHA1 hash function in utils.js with a SHA256 function. Incidentally, I noticed that there was a TODO comment saying that this needed to be done, so I could help add that PR.

HOWEVER, to verify DNT policies, PrivacyBadger references EFF's website at https://www.eff.org/files/dnt-policies.json. This is still in SHA1, so my test will always fail for the Edge extension. @ghostwords , would it be possible to upload a SHA256 version, like on https://www.eff.org/files/dnt-policies-256.json? I've already created the local version on my fork (https://github.com/spaceraccoon/privacybadger-edge/blob/master/src/data/dnt-policies.json).

@ghostwords
Copy link
Member Author

Hi @spaceraccoon! We are currently blocked from publishing Privacy Badger for Edge by the Windows Developer Agreement: #1290 (comment).

To get Badger fully working for your own purposes, you could use a SHA1 polyfill (essentially reverting parts of #1209). This should incidentally remove the need for a TextEncoder polyfill.

@spaceraccoon
Copy link

Thanks @ghostwords ! As a side note, would you be moving to SHA256 soon anyway? I noticed it’s a TODO and would love to contribute

@ghostwords
Copy link
Member Author

That TODO should be removed; I don't think that's a cryptographically-sensitive application. Do take a look through our "good first issue" and "help wanted" labels!

@spaceraccoon
Copy link

Thanks! I'm passing all tests now and it seems to be working just fine. I'll look at the good first issues and hopefully have time to contribute.

@andresbase
Copy link

Hi everyone, I have good news.

After further internal discussion, we've decided we can go ahead and publish in Microsoft Store. The next step should be putting together a pull request with fixes for Edge.

Thanks a lot for your support!

@SocietasEvanescentes
Copy link

Please @ me when it's live! I love the extension but prefer Microsoft edge 💙

@FrancescoGd
Copy link

Hi everyone, I have good news.

Great, can't wait! Thank you!

@ghostwords
Copy link
Member Author

One thing that would help us get the Edge version out faster is somebody documenting or pointing to existing documentation resources for developing for Edge on Linux.

@Dahring
Copy link

Dahring commented Dec 7, 2018

How does it look like now with the MS switch towards Chromium? Would it be easier to create extensions for Edge?

@ghostwords
Copy link
Member Author

Probably, but it depends on how they choose to handle extensions in their Chromium-based browser. We need more information.

What this does mean though is that we shouldn't spend our time developing for Edge since it's about to get cancelled ...

@ocdtrekkie
Copy link

My understanding is the Edge extension is basically a repackaged version of the Chrome extension to begin with, it's likely that won't change much when they switch engines. It makes no sense not to proceed forward.

@rmarquis
Copy link

From Kyle Alden, Microsoft Edge project manager:

It's our intention to support existing Chrome extensions.

@Scontoni
Copy link

Any update on this?

@ocdtrekkie
Copy link

The new Edge will be able to install Chrome extensions straight from the Chrome Web Store, so not much reason to bother now.

@ghost
Copy link

ghost commented Dec 16, 2019

https://blogs.windows.com/msedgedev/2019/12/16/get-started-extensions-addons-microsoft-edge-chromium/ Anyone can now submit extensions for edge chromium.

@DavidBurela
Copy link

DavidBurela commented Jan 11, 2020

I have been using the Privacy Badger extension in the new Microsoft Edge for months without issues.
You can install chrome extensions from the chrome store into the new Edge, but it does require enabling the feature which may turn off non-tech savvy users.
https://microsoftedgesupport.microsoft.com/hc/en-us/articles/360017581013-Install-a-Chrome-Web-Store-extension-on-Microsoft-Edge-for-Windows-and-MacOS

You should still submit it to the Microsoft Store to make discovery and installation much easier, especially as has been noted it will soon be the new default browser on Windows.

The extension most likely will be able to be submitted without any modifications. Maybe an update on the "Manage Data" settings tab to mention Edge sync.
https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/developer-guide/port-chrome-extension

Access to your extension submissions dashboard, info, etc. can be found
https://developer.microsoft.com/en-us/microsoft-edge/extensions/

Disclaimer: Software Engineer at Microsoft. But have no relation with the Edge team.

@ghostwords
Copy link
Member Author

Hi everybody! We published Privacy Badger in the Microsoft Store under a hidden link. Could you visit the Privacy Badger Microsoft Store listing, install Privacy Badger on Edge, and let us know if you run into any issues? Thank you for the patience and encouragement!

@DavidBurela
Copy link

removed the chrome store version, and switched to the Microsoft store version.
Been running it all day, haven't encountered any issues.

@b4rt0s1k
Copy link

I found this thread when I wanted to report a bug. In Microsoft Edge with the Chrome store Privacy Badger installed, its icon is grey and the extension is pegged at about 120% CPU in the chromium task manager. Opening the privacy badger options will hang the browser. Removing and reinstalling did not help. Disabling all other extensions did not help. Issue resolved itself after an extended period of time (20 - 200 min?)

Edge Version 81.0.403.1 (Official build) dev (64-bit)
Other extensions: Lastpass, DuckDuckGo Privacy Essentials

I found the secret Microsoft Store link for Privacy Badger in this thread and will try that version instead. If the extension in the Chrome and Microsoft store isn't identical, they should identify which browser they run on and point out the existence of the other version to the user - best would be if they are identical of course.

privacybadger

@ghostwords
Copy link
Member Author

The Privacy Badger Edge listing is now public: https://microsoftedge.microsoft.com/addons/detail/mkejgcgkdlddbggjhhflekkondicpnop

We've begun the process to get the Privacy Badger website updated to include Edge.

@b4rt0s1k If CPU usage is still a problem, could you open a new issue please?

@DavidBurela
Copy link

Thanks for taking the time to get this on the store. I hope it brings in a wave of new users

@FrancescoGd
Copy link

Thank you so much! 🙂

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

No branches or pull requests