Skip to content

Support for Edge #19

@xt0rted

Description

@xt0rted

Edge has extension support using the same api as Chrome. I ran the code though the Microsoft Edge Extension Toolkit and was able to get it loading, but that's as far as I could get with it for now.

Activity

schomery

schomery commented on Feb 7, 2017

@schomery
Contributor

@xt0rted can we submit extensions for MS Edge? As far as I know they don't accept extensions yet

xt0rted

xt0rted commented on Feb 7, 2017

@xt0rted
Author

More extensions have been showing up such as LastPass, Ghostery, Tampermonkey and uBlock (this one is odd because I can never find it in the store, but I can find it with the direct link).

Right now the only way to get an extension listed is to send a request about it and possibly by reaching out to the Edge team for more info https://twitter.com/msedgedev

xt0rted

xt0rted commented on Apr 7, 2017

@xt0rted
Author

Now that Edge 15 has shipped with the Creators Update I gave this another go. The extension loads and generally works on the surface. I'm even able to go to userstyles.org and install the GitHub-Dark style. But this is where things fall apart.

Even though the style installed I don't see it listed under Manage. Nor does it show as running when I'm on GitHub.

This code is failing

chrome.tabs.query({ currentWindow: true }, function(tabs) { ... });

For some reason tabs is undefined, yet if I pass false it returns an array of tabs for the other instances of Edge. I pinged the Edge team on twitter to see what their thoughts are on this.

Trying to add a style for a site/page brings up the edit page, but there's no editor. This may be related to the above error, or it may be related to the other one I'm seeing which points to edit.js

function addSection(event, section) {
	var div = template.section.cloneNode(true);

The template.section is undefined.

tophf

tophf commented on Apr 7, 2017

@tophf
Member

The template.section is undefined.

It should be automatically set by localization.js in the editor. The error means one needs to actually debug the code and find out where and why and what is wrong. I don't use Edge nor plan to. OTOH I'll see if it's easy to fix once the big upcoming PR #50 is finalized.

xt0rted

xt0rted commented on Apr 7, 2017

@xt0rted
Author

The template object isn't being properly setup because node.content doesn't contain a .firstElementChild property in Edge. According to the docs Edge supports templates, but the API isn't the same as what Chrome supports. If I remove it or replace it with .clone(true) then the extension loads more and I can see the editor, but code mirror itself is unresponsive and there's a bunch of new errors shown in the console.

With this change I'm still able to install GitHub-Dark, but it doesn't show as installed. It does on the website, but not in the extension menu or manage page.

tophf

tophf commented on Apr 7, 2017

@tophf
Member

.content property is a DocumentFragment according to spec, meaning it must have .firstElementChild, meaning it's an Edge bug. Of course the workaround is simple in this case, but the real problem is that it's apparently not the only thing that's implemented in Edge differently.

xt0rted

xt0rted commented on Apr 7, 2017

@xt0rted
Author
tophf

tophf commented on Apr 7, 2017

@tophf
Member

Well, I guess .querySelector('*') might work the same as .firstElementChild.

xt0rted

xt0rted commented on Apr 7, 2017

@xt0rted
Author

Removing .firstElementChild seems to work, using anything else just causes more errors. I was also able to get code mirror functioning by fixing what looks to be a bug in it at codemirror.js#L7145. I changed it to if (next && next.attach).

I'm still not able to save a style or run one, but it's starting to work more at least.

tophf

tophf commented on Apr 8, 2017

@tophf
Member

Try changing that line to template[node.dataset.id] = tHTML(node.innerHTML);
Also check if #50 zip supports Edge any better.

tophf

tophf commented on Apr 9, 2017

@tophf
Member

I've finally tried Edge:

  • it complained about a few optional manifest.json keys not being set ("author", "persistent")
  • it couldn't use chrome.i18n without it being explicitly specified in manifest.json
  • it failed to access prefs.get in background page and I don't see how to debug the background page while it's loading, which is extremely easy and convenient in Chrome.
  • its devtools underlines let and const as errors.

I've fixed the first two but on the 3rd and 4th I've remembered the days of IE6, so no, I won't be touching it.

P.S. One would expect an excellent debugging experience for WebExtensions from a company that makes Visual Studio but alas, it's even worse than that of Firefox. It's really weird that Chrome, the most simplified browser that never aimed to be advanced, offers a much more advanced and complete debugging experience for extensions while the competition lags far behind or simply sucks.

DanaMW

DanaMW commented on Nov 18, 2017

@DanaMW

Sorry should have paid more attention. Take care,

30 remaining items

Kobi-Blade

Kobi-Blade commented on Jun 20, 2019

@Kobi-Blade

The comment above yours says all you need to do is enable a setting to install from CWS. Not sure we wanna sign up for all the extra aggravation which is practically inevitable when dealing with yet another extension gallery, particularly when installing from CWS seems fairly straightforward.

Cause the feature set and extension rules are different between Microsoft Edge (Chromium) and Chrome, is currently working cause it's in the early stages.
So would be preparing for the future.

Microsoft has stated that they intend to support Chrome extensions with Chromium-Edge. (Allowing extensions to be installed from the CWS is pretty indicative of this in any case.)

They have, and goes besides the point that he totally missed, he shows BIAS towards Google (with hate towards Microsoft).

If anyone is being hostile and anti-user is Google, and every Chromium Browser and Extension Developer are trying to shift away from them.

I though this project was open minded, currently we playing favorites with Google.

Mottie

Mottie commented on Jun 20, 2019

@Mottie
Member

I though this project was open minded

We are. There's only a few of us consistently working on this project (one less if you don't count me since I've been neglecting this project lately 😿). We're all busy and we each have our own browser preference. If you'd like to contribute, PRs are welcome.

narcolepticinsomniac

narcolepticinsomniac commented on Jun 20, 2019

@narcolepticinsomniac
Member

he shows BIAS towards Google (with hate towards Microsoft).

What makes you think I don't dislike them both equally? I use Chromium, or various forks, but haven't used Google Chrome in many years. Besides search, and a couple unavoidable gmail accounts, I avoid their services whenever possible. For the record, I'm not a huge fan of Mozilla either.

This has nothing to do with which company we like better, or dislike less. The point is, there are two main browsers which support WebExtensions, Chromium and Firefox. If we wanna support Firefox, they've restricted extension installations to AMO, so we need to deal with AMO. Google dominates Chromium, and the browser market share in general, so since they've restricted extension installations to CWS, we also need to deal with CWS.

All other Chromium forks have the luxury of built-in compatibility with CWS. To intentionally make a Chromium fork incompatible with CWS would certainly be "anti-user". I'm applying that term to that particular detail alone, not comparing the companies as a whole. If we did, it'd be a toss up between M$ and Google IMO.

every Chromium Browser and Extension Developer are trying to shift away from them.

"Shift away" how, and to where? Google has ~70% market share, and will only install extensions from CWS, so if you want to actually be available to all Chromium users, CWS is the only host which allows for that.

Everyone besides you seems to think this is a non-issue, and M$ will support installs from CWS, which would be the logical decision. Pretty much all Chromium forks allow this in one way or another. Like it or not (I don't), Google has been calling most of the shots with Chromium for over a decade now. You can fork Chromium and make it your own to a certain extent, but to restrict CWS and attempt to force developers into your own, redundant, closed ecosystem, will not work out well for users, or the browser's success in general.

Don't get it twisted though, if the situation were reversed, and you swapped M$ for Google in this hypothetical, I'd feel the exact same way.

xt0rted

xt0rted commented on Jun 21, 2019

@xt0rted
Author

I don't use Win 10, and AFAIK there aren't even official releases for other versions of Windows yet.

Canary builds for Windows 7, 8, and 8.1 were just made available yesterday. https://www.microsoftedgeinsider.com/en-us/download/

narcolepticinsomniac

narcolepticinsomniac commented on Jun 21, 2019

@narcolepticinsomniac
Member

Yeah, I checked it out yesterday. Stylus installed easily and seems to work as expected when I briefly tested. Takes a long time to get a browser set up how you like though, and I would never use Canary regularly anyway.

I'm hooked on Cent these days. Compact UI, double clicks close tabs, integrated command line switches, and truly portable. So many other cool little features that I instantly miss when using any other browser.

tophf

tophf commented on Feb 4, 2020

@tophf
Member

Stylus works in the new Edge so let's consider this "implemented" 😄

Mottie

Mottie commented on Feb 4, 2020

@Mottie
Member

Now if I can get my re-install of Windows 10 to actually not fail at updating, maybe I can get Edge-chromium to work 🤣

Soitora

Soitora commented on Feb 10, 2020

@Soitora

Stylus works in the new Edge so let's consider this "implemented" 😄

Can this be added to the Edge Extension store as well?

Kobi-Blade

Kobi-Blade commented on Feb 23, 2020

@Kobi-Blade
FranklinYu

FranklinYu commented on Feb 23, 2020

@FranklinYu
Kobi-Blade

Kobi-Blade commented on Feb 23, 2020

@Kobi-Blade
tophf

tophf commented on Feb 23, 2020

@tophf
Soitora

Soitora commented on Feb 24, 2020

@Soitora
locked as off topic and limited conversation to collaborators on Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Mottie@AaronKelley@xt0rted@grand-lotus-iroh@tophf

        Issue actions

          Support for Edge · Issue #19 · openstyles/stylus