asciidoctor / asciidoctor-browser-extension

:white_circle: An extension for web browsers that converts AsciiDoc files to HTML using Asciidoctor.js.
https://chrome.google.com/webstore/detail/asciidoctorjs-live-previe/iaalpfgpbocpdfblpnhhgllgbdbchmia
MIT License
218 stars 50 forks source link

Publish the extension on Edge #184

Open ggrossetie opened 6 years ago

ggrossetie commented 6 years ago

Microsoft rolled out the next stage: It is now possible to submit an extension for review.

Request submitted today! https://developer.microsoft.com/en-us/microsoft-edge/extensions/requests/

ggrossetie commented 6 years ago

For Microsoft Edge, all extension APIs are under the browser namespace, e.g. browser.browserAction.disable()

Currently the extension is using the chrome namespace. If all browsers are using the (new) browser namespace then we should use it. If only Edge is using the new browser namespace then we should test if chrome namespace is defined and if not use the browser namespace.

https://docs.microsoft.com/en-us/microsoft-edge/extensions/api-support/supported-apis

Request submitted today!

Actually a few steps are missing... I need to follow this guide to package the extension: https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/packaging/creating-and-testing-extension-packages

ggrossetie commented 6 years ago

The extension is now working on Edge

edge

I will publish an unsigned package on GitHub soon. Hopefully the next version will be signed once I've figured out how to sign a package!

mojavelinux commented 6 years ago

:tada:

ggrossetie commented 6 years ago

I've just received an email from the Microsoft Edge Extensions Team:

Hi, Thanks for your interest in the Microsoft Edge extensions platform! We're sending you this mail to inform you that your request to publish Asciidoctor Live Preview to the Windows Store has been approved. Please feel free to submit your Edge extension AppX via the Windows Dev Center. If you have any questions about the publication process, the Publishing to the Windows Store section of our Getting Started guide has answers to common extension-specific questions we’ve heard in the past. If you're looking for more general information on the Windows Store, Dev Center Support also has some great resources available! Thanks, The Microsoft Edge Extensions Team

:rocket:

ggrossetie commented 6 years ago

I think we should use Manifoldjs to generate the vendor specific archive: https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/packaging/using-manifoldjs-to-package-extensions

ggrossetie commented 5 years ago

We will wait until the next version of Edge (based on Chromium) is publicly available.

ggrossetie commented 4 years ago

You can install extensions from other stores in Edge (Chromium). That means that you can install the Asciidoctor browser extension from the Chrome Web Store.

  1. Go to edge://extensions
  2. Check Allow extensions from other stores
  3. Go to https://chrome.google.com/webstore/detail/asciidoctorjs-live-previe/iaalpfgpbocpdfblpnhhgllgbdbchmia
  4. Install the extension

As far as I know the Microsoft store for Edge extensions is still in closed beta (invitation only) so I cannot publish the extension (yet).

sysfu commented 4 years ago

Any update on this with regards to Edge Dev? I'm running Edge Dev 83.0.478.5 (Official build) dev (64-bit) and just updated to the 2.5.0 release, but the extension seems to remain broken on this platform going on several months.

ggrossetie commented 4 years ago

I didn't know... thanks for your report! I will check on my machine. Do you see any error in the console?

It's surprising because Edge is now using Chromium and the last time I checked the Web Extensions API was almost identical to Chrome... 🤔

ggrossetie commented 4 years ago

@sysfu seems to be working fine on my machine with Edge Dev 83.0.478.10 and version 2.5.0:

Extension installed

edge-ext-installed

Local file

ok-local-edge

Remove file (GitHub)

remote-ok-edge

but the extension seems to remain broken on this platform going on several months.

Could you please clarify what is not working exactly?

sysfu commented 4 years ago

I think I discovered the issue; it does not work with documents that are loaded from a UNC network path. Should I open a new issue for this?

ggrossetie commented 4 years ago

Yes please, this issue is more about publishing the extension to the Edge store (but since it can be installed through the Chrome extension store I didn't put too much focus on it).

sysfu commented 4 years ago

Should https://github.com/asciidoctor/asciidoctor-browser-extension/issues/94 be re-opened, or do you think this merits a new issue?

ggrossetie commented 4 years ago

Can you confirm that this is the same issue? Do you have a CORS error? If that is the case then the only way to work around it is to do one of:

sysfu commented 4 years ago

I don't think it's CORS, opening a new issue

ggrossetie commented 4 years ago

@sysfu I had an idea to render the document. I think we can get the initial content from the current page/document (without using an XMLHttpRequest). Having said that, this solution will only work if you disable the live reload so, if you update your AsciiDoc document, changes won't be visible unless you manually refresh the page. Do you think it's worth it?

ggrossetie commented 4 years ago

Sorry I meant to comment on https://github.com/asciidoctor/asciidoctor-browser-extension/issues/353 :sweat_smile:

sysfu commented 1 year ago

@sysfu I had an idea to render the document. I think we can get the initial content from the current page/document (without using an XMLHttpRequest). Having said that, this solution will only work if you disable the live reload so, if you update your AsciiDoc document, changes won't be visible unless you manually refresh the page. Do you think it's worth it?

Just noticing this comment three years later. I think it would be worth it yes, but I have since moved on to another job where I don't make use of AsciiDoc. Refreshing a page is much less complicated than setting up a local web server or file sync.