Ponyhoof's Response to Maxthon's Extension Framework


bricky149

Recommended Posts

I had submitted the extension late last night, only to be told to take the extension down as well as other things:

"This is the exactly the same method how another person packaged Ponyhoof in Maxthon, and it has the exact same issues:

1. Settings storage is not stored on the extension, but on the Facebook website itself

2. You cannot store settings on the FB's side because they will aggressively force clear everything every 5 minutes, making Ponyhoof keep running the welcome screen.

3. Because the settings aren't stored properly, Ponyhoof keeps complaining it is outdated even though v1.571 is the latest version.

4. Update-checking and Browser Ponies do not work as each browser requires their own way of doing cross-XMLHttpRequest.

So no, this is a big failure, and I do not approve. Please remove it from the Maxthon Extensions Center.

I took some time to look at their documentation and tried to build Ponyhoof for Maxthon and I can say this:

Everything they have done is a total f**king joke.

First off, their documentation offers no real good help.

It's just a Word document telling you "there is this API function to do this, and that function to do that", but that's it.

I don't even call it a documentation, this is a REFERENCE.

They offer window.external.mxGetRuntime().storage.setConfig() to store settings, that's exactly what I'm looking for. However, they never said what limitations does the API have.

Do I need to use message passing between the content script and a background process to store settings (like Opera/Safari), or can I call the function directly in the content script?

I found out that I can indeed call the storage functions directly from the content script, that's a good thing. But then, why do I need to do the experiment? Shouldn't the documentation explain further?

Second, their packager program is proprietary junk, and does not seem to offer command line for automation.

I have a build script that can easily build versions for Greasemonkey/Chrome/Opera all in one go, while Safari needs to be manually done with its GUI, which is just annoying.

If I intend to support Maxthon in the future, there will yet another program I need to click through every time I want to release an update.

Next, Maxthon does not seem to have an extension development mode like Chrome/Opera/Safari where I can easily load an unpacked extension in a folder, and have it reloaded quickly.

Maxthon requires you to use their junk packager program to package the extension and then you can actually install into it. Well, it sure annoys me with all the extra mouse clicks.

Then, the F12 developer tools are completely dead. Chrome/Opera have developer tools that fully support extensions, and I can set Javascript breakpoints and easily drill down to the problematic code.

In Maxthon, they are completely dead. The F12 developer tools are useless, it can't set breakpoints properly, and it can't read source files properly.

I did managed to get the storage API fully working, and next, I need to support AJAX/XMLHttpRequest to do update-checking and Browser Ponies.

Since the documentation is piss-poor, I did not expect that content scripts can do cross-XHR, but amazingly, it does work on most websites, but Facebook's Content Security Policy (CSP) is blocking XHRs to other domains.

Because of that, I need to use message passing to tunnel to the background process, have that do the actual request, and pass back to the main content script.

Sure, I need to do this for other browsers as well, but the poor documentation seriously annoys me.

Finally, I got Maxthon to store the settings properly and got AJAX working. I realized that Maxthon doesn't even have a way to clear storage if I want to! In other browsers, they are as simple as chrome.storage.local.clear() or localStorage.clear() or widget.preferences.clear() or safari.extension.settings.clear() or doing a loop of GM_listValues() and GM_deleteValue() one by one.

But Maxthon has no way to even list all the values.

Supporting Maxthon is not as easy as plugging the ponyhoof.user.js file into an extension and crossing your fingers. Not only I just need to support the Maxthon settings API and make XHR work, I also need to update the installer to detect Maxthon, make the updater in Ponyhoof Options detect Maxthon and show the proper instructions when there is a new version, get screenshots and re-write the FAQ.

In the end, Maxthon support is a nice-to-have, but since it's used even less often than Opera, it's not a high priority compared to all the other stuff that we are planning."

Link to comment
Share on other sites

where I can easily load an unpacked extension in a folder, and have it reloaded quickly.

I'm pretty sure that can be done. I'm almost certain I was using that very feature when I was playing around with an extension. It may have had to be in a TEST\plugin hierarchy, but still, it's there.

The rest is pretty much spot on. The documentation needs a lot of work and possibly needs some updating for MX4.

Hopefully the MX team read this and see what some dev's are having to go thru to try and develop addons for MX.

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.