This repository has been archived by the owner. It is now read-only.

WebExtension port #36

Closed
alexander255 opened this Issue Apr 28, 2017 · 11 comments

Comments

Projects
None yet
3 participants
@alexander255

alexander255 commented Apr 28, 2017

As you probably know Mozilla has committed itself to going WebExtension-only. So there won't be any way to run classic bootstrapped add-ons anymore (ignoring the loophole of WebExtensions Experiments).

Since this project did not look very active and I did not like any of the alternatives on AMO, I decided to start reimplementing this as a WebExtension:
https://gitlab.com/alexander255/user-agent-switcher

Since the programming model and level of achievable integration is very different in WebExtension-land this port cannot really reuse any code, but does aim to be a successor in terms of UI and configuration. In particular the classic text-editor style configuration has completely reimplemented additionally to a more interactive table-based approach. The icon menu is practically unchanged.

Current TODOs:

  • Internationalization
  • Maybe migration from previous add-on? (Would it be worth the extra trouble?)

What are your thoughts on this?

@yfdyh000

This comment has been minimized.

Show comment
Hide comment
@alexander255

This comment has been minimized.

Show comment
Hide comment
@alexander255

alexander255 Apr 29, 2017

Yes, I know 😉:

Since this project did not look very active and I did not like any of the alternatives on AMO, …

I wanted something that gives me more flexibility than what User-Agent-Switcher Revived offers (which is why I had used User Agent Overrider in the first place), so I based my efforts on this extension instead. I believe the target audiences of both extensions are somewhat different.

I also hope that this work can be a continuation of User Agent Overrider in all but code, ideally without creating another… (revived) extension.

@muzuiget: I'd love to hear your thoughts on this 🙂

alexander255 commented Apr 29, 2017

Yes, I know 😉:

Since this project did not look very active and I did not like any of the alternatives on AMO, …

I wanted something that gives me more flexibility than what User-Agent-Switcher Revived offers (which is why I had used User Agent Overrider in the first place), so I based my efforts on this extension instead. I believe the target audiences of both extensions are somewhat different.

I also hope that this work can be a continuation of User Agent Overrider in all but code, ideally without creating another… (revived) extension.

@muzuiget: I'd love to hear your thoughts on this 🙂

@muzuiget

This comment has been minimized.

Show comment
Hide comment
@muzuiget

muzuiget Apr 29, 2017

Owner

Hi @alexander255, I have no plan to port to WebExtension yet. Because I am not have strong requirement about changing UA, too lazy to do this. I will keep it work in Firefox 52-56(the last ESR and XUL usable version).

Although your extension want to share some term from UAO. Because your extension code start from starch, I suggest you pick a total different extension name, something like "User Agent XXX", not "User Agent Overrider" + suffix. You don't need to make the codebase fork from mine.

So, just upload a new extension to AMO yourself, maintain it yourself. If your extension UI is similar to UAO, I am happy add a link to your extension page, suggest Firefox 57+ users to switch to your extension. You can write a docs or web-base tools to help user migrate UAO configure.

Owner

muzuiget commented Apr 29, 2017

Hi @alexander255, I have no plan to port to WebExtension yet. Because I am not have strong requirement about changing UA, too lazy to do this. I will keep it work in Firefox 52-56(the last ESR and XUL usable version).

Although your extension want to share some term from UAO. Because your extension code start from starch, I suggest you pick a total different extension name, something like "User Agent XXX", not "User Agent Overrider" + suffix. You don't need to make the codebase fork from mine.

So, just upload a new extension to AMO yourself, maintain it yourself. If your extension UI is similar to UAO, I am happy add a link to your extension page, suggest Firefox 57+ users to switch to your extension. You can write a docs or web-base tools to help user migrate UAO configure.

@alexander255

This comment has been minimized.

Show comment
Hide comment
@alexander255

alexander255 Apr 29, 2017

Hi @muzuiget!
I didn't really want to start from scratch: It's just that there wasn't much I could have reused either way (HTML instead of XUL, HTTP-Headers + Content-Scripts instead of changing prefs, …). Both the UI and the browser interaction have to be different for WebExtensions and in this add-on there really isn't any "business logic" to speak of in-between either.

Anyway, the main motivation for not wanting it to be a separate extension would be to have continuity for existing users. They would just (automatically) update to a new version and nothing would change for them (even post-57). It would even be possible to cleanly migrate the add-on configuration in this case.

To clarify again: I created this code-base from scratch and proposed it as possible next version because it was the only possible way to make this happen and I didn't mean to impose this on you in any way. This was meant as an offer that could benefit existing users (one add-on less to worry about during the 57 migration), not an attempt copy-cat you.
I do understand however if you don't want just adopt the code base of some random dude on the internet for your extension. 😉

So if your decision to let the extension let this add-on EOL with FF57 is final please just confirm this and I will publish my code under a different name myself.

Have a nice day! 🙂

alexander255 commented Apr 29, 2017

Hi @muzuiget!
I didn't really want to start from scratch: It's just that there wasn't much I could have reused either way (HTML instead of XUL, HTTP-Headers + Content-Scripts instead of changing prefs, …). Both the UI and the browser interaction have to be different for WebExtensions and in this add-on there really isn't any "business logic" to speak of in-between either.

Anyway, the main motivation for not wanting it to be a separate extension would be to have continuity for existing users. They would just (automatically) update to a new version and nothing would change for them (even post-57). It would even be possible to cleanly migrate the add-on configuration in this case.

To clarify again: I created this code-base from scratch and proposed it as possible next version because it was the only possible way to make this happen and I didn't mean to impose this on you in any way. This was meant as an offer that could benefit existing users (one add-on less to worry about during the 57 migration), not an attempt copy-cat you.
I do understand however if you don't want just adopt the code base of some random dude on the internet for your extension. 😉

So if your decision to let the extension let this add-on EOL with FF57 is final please just confirm this and I will publish my code under a different name myself.

Have a nice day! 🙂

@muzuiget

This comment has been minimized.

Show comment
Hide comment
@muzuiget

muzuiget Apr 30, 2017

Owner

The UAO configure is simple, use can copy/paste from edtir, or you can directly read the about:config items which name prefix with extensions.useragentoverrider..

So, if you release your extension, please tell me your migratie guide here, I will add it in UAO page or UI.

Owner

muzuiget commented Apr 30, 2017

The UAO configure is simple, use can copy/paste from edtir, or you can directly read the about:config items which name prefix with extensions.useragentoverrider..

So, if you release your extension, please tell me your migratie guide here, I will add it in UAO page or UI.

@alexander255

This comment has been minimized.

Show comment
Hide comment
@alexander255

alexander255 May 7, 2017

So I've finally submitted the new extension (after tweaking it a bit more):
https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/

The page already contains a migration guide and the extension there can be installed if signature checking is disabled. Let me know what you think. 🙂

The extension is also currently #629 in the review queue and some source I've read claims that it will take about 1 month before they finally get to review it. 😦 We'll see… I can however push new updates without loosing my spot in the line, so if you have any further ideas, now would be a good time!

alexander255 commented May 7, 2017

So I've finally submitted the new extension (after tweaking it a bit more):
https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/

The page already contains a migration guide and the extension there can be installed if signature checking is disabled. Let me know what you think. 🙂

The extension is also currently #629 in the review queue and some source I've read claims that it will take about 1 month before they finally get to review it. 😦 We'll see… I can however push new updates without loosing my spot in the line, so if you have any further ideas, now would be a good time!

@muzuiget

This comment has been minimized.

Show comment
Hide comment
@muzuiget

muzuiget May 8, 2017

Owner

Good work. And I add the link to your extension AMO page on README and mine AMO page.

By the way, I suggest you also change the icon a bit, at least change the icon background color, I upload the svg file, you can use Inkscape edit and export the png files.

Owner

muzuiget commented May 8, 2017

Good work. And I add the link to your extension AMO page on README and mine AMO page.

By the way, I suggest you also change the icon a bit, at least change the icon background color, I upload the svg file, you can use Inkscape edit and export the png files.

@alexander255

This comment has been minimized.

Show comment
Hide comment
@alexander255

alexander255 May 8, 2017

Well, my artistic skills sufficed to change the color a bit: https://gitlab.com/alexander255/user-agent-switcher/blob/master/assets/icon.svg. I hope that's fine anyway? 🙂

If there is nothing else I'll push a new version to AMO.

alexander255 commented May 8, 2017

Well, my artistic skills sufficed to change the color a bit: https://gitlab.com/alexander255/user-agent-switcher/blob/master/assets/icon.svg. I hope that's fine anyway? 🙂

If there is nothing else I'll push a new version to AMO.

@muzuiget

This comment has been minimized.

Show comment
Hide comment
@muzuiget

muzuiget May 9, 2017

Owner

You image url return Non-Image content-type returned

Owner

muzuiget commented May 9, 2017

You image url return Non-Image content-type returned

@alexander255

This comment has been minimized.

Show comment
Hide comment
@alexander255

alexander255 May 9, 2017

That's because I linked the page containing the icon instead of the icon itself. Here's the actual icon link (hope it works):
Just click this link instead: https://gitlab.com/alexander255/user-agent-switcher/blob/master/assets/icon.svg (icon is apparently embedded as base64 data:-URI -.-)

alexander255 commented May 9, 2017

That's because I linked the page containing the icon instead of the icon itself. Here's the actual icon link (hope it works):
Just click this link instead: https://gitlab.com/alexander255/user-agent-switcher/blob/master/assets/icon.svg (icon is apparently embedded as base64 data:-URI -.-)

@muzuiget

This comment has been minimized.

Show comment
Hide comment
@muzuiget

muzuiget May 10, 2017

Owner

It look fine.

Owner

muzuiget commented May 10, 2017

It look fine.

@muzuiget muzuiget closed this Jun 20, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.