plibither8 / asciinema-player-for-github

🎬✨ Browser extension to automatically detect asciinema links in a project's README and embed the asciinema player in its place
MIT License
32 stars 3 forks source link

Extensions for other browsers #1

Closed shreyasminocha closed 5 years ago

shreyasminocha commented 5 years ago

Would it be possible to build a firefox add-on from this code?

plibither8 commented 5 years ago

Welp, porting the extension to FF would have been super simple had Chrome's APIs (the CSP modifications in src/background.js) not been a part of the code. I don't know much about Firefox development/APIs.

It'd be great if you could contribute if you a thing or two about FF add-ons. :smile:

Thanks!

shreyasminocha commented 5 years ago

Looks like FF ≥45 supports onHeadersReceived. Moreover, FF supports the chrome namespace as well (although it's not part of the spec).

shreyasminocha commented 5 years ago

Let me try to file a PR :)

plibither8 commented 5 years ago

Moreover, FF supports the chrome namespace as well (although it's not part of the spec).

Interesting. That's pretty generous of Firefox.

Let me try to file a PR :)

Great :+1:

shreyasminocha commented 5 years ago

I've tested that it's working, but I think it's best if you package and submit because it involves signing and other stuff that would best be done using your keys/accounts.

shreyasminocha commented 5 years ago

Porting to Edge (supports webRequest.onHeadersReceived) and Opera (also supports supports webRequest.onHeadersReceived).

plibither8 commented 5 years ago

That's great, I'll look into those browsers too, thanks!

Meanwhile, testing the add-on on FF on my machine, I'm getting the following error: image

How should I proceed?

shreyasminocha commented 5 years ago

Strange, I cannot reproduce. I'm running Firefox Quantum 64.0 (64-bit). Which version are you running?

plibither8 commented 5 years ago

Firefox Quantum 65.0 (64-bit) on Linux. Just so we are on the same page, I am testing the add-on on about:debugging, yeah?

plibither8 commented 5 years ago

I was too quick to call it off: the add-on is working alright, regardless of that error :sweat_smile:.

I'll package and submit the add-on for FF tonight.

Cheers!

shreyasminocha commented 5 years ago

I was testing via web-ext, but great that it worked. Cheers!

plibither8 commented 5 years ago

Hey @shreyasminocha! This has come way too late, but finally: https://addons.mozilla.org/en-US/firefox/addon/asciinema-player-for-github/

Apologies for the delay :sweat_smile:

shreyasminocha commented 5 years ago

Hey, that's great. Thanks!