Basilisk maff/mhtml compatibility?

Forum for discussions around the Basilisk web browser.

Moderator: satrow

Sun42
Apollo supporter
Apollo supporter
Posts: 30
Joined: Sat, 26 Sep 2015, 16:28
Location: Here

Basilisk maff/mhtml compatibility?

Postby Sun42 » Sun, 03 Dec 2017, 00:41

One of the main reasons for sticking with legacy extensions and not using e10s is the "Mozilla Archive Format" extension.

But on Basilisk, it doesn't seem to work properly - I can save alright, but on opening a .mht or .maff the browser just wants to save it instead of showing the content. Alas, the Pale Moon-specific extension isn't compatible either.

Help, anyone, pretty please with sugar on it?

GMforker
Lunatic
Lunatic
Posts: 497
Joined: Thu, 27 Aug 2015, 06:29
Location: Czech Republic

Re: Basilisk maff/mhtml compatibility?

Postby GMforker » Sun, 03 Dec 2017, 07:43

Sun42 wrote:The "Mozilla Archive Format" (5.2.0 - editor's note) extension...
But on Basilisk, it doesn't seem to work properly - I can save alright, but on opening a .mht or .maff the browser just wants to save it instead of showing the content.

Not compatible with Basilisk (Goanna), unfortunately (at least not currently).

Because it does not correctly detect Basilisk (respectively of the core: Goanna):

"chrome/content/startup/StartupInitializer.js" - lines: 161, 167:
Gecko-Content-Viewers instead of Goanna-Content-Viewers

And elsewhere (e.g. when associating file extensions) - distinguishes "only" between Firefox and SeaMonkey.

Sun42
Apollo supporter
Apollo supporter
Posts: 30
Joined: Sat, 26 Sep 2015, 16:28
Location: Here

Re: Basilisk maff/mhtml compatibility?

Postby Sun42 » Sun, 03 Dec 2017, 09:54

GMforker wrote:
Sun42 wrote:The "Mozilla Archive Format" (5.2.0 - editor's note) extension...
But on Basilisk, it doesn't seem to work properly - I can save alright, but on opening a .mht or .maff the browser just wants to save it instead of showing the content.

Not compatible with Basilisk (Goanna), unfortunately (at least not currently).

Because it does not correctly detect Basilisk (respectively of the core: Goanna):

"chrome/content/startup/StartupInitializer.js" - lines: 161, 167:
Gecko-Content-Viewers instead of Goanna-Content-Viewers

And elsewhere (e.g. when associating file extensions) - distinguishes "only" between Firefox and SeaMonkey.


So it would be an easy search/replace job Gecko->Goanna and SeaMonkey->Basilisk (or Firefox->Basilisk)?

Is that a common problem, i.e. will more legacy extenstions be incompatible simply due to the renamed browser/renderer?

ianas
Moonbather
Moonbather
Posts: 60
Joined: Sat, 25 Nov 2017, 02:48

Re: Basilisk maff/mhtml compatibility?

Postby ianas » Sun, 03 Dec 2017, 10:06

There's a fork that works under PaleMoon
https://addons.palemoon.org/addon/mozarchiver/
Unfortunately it doesn't recognize Basilisk as a compatible browser maybe a tweak of install.rdf is all that's needed to add maff support for Basilisk

edit
this does not work by editing mozarchiver's install.rdf you can get Basilisk to install mozarchiver but the addon won't work
at the moment your only choice is to use PaleMoon with Mozarchiver

GMforker
Lunatic
Lunatic
Posts: 497
Joined: Thu, 27 Aug 2015, 06:29
Location: Czech Republic

Re: Basilisk maff/mhtml compatibility?

Postby GMforker » Sun, 03 Dec 2017, 19:15

Sun42 wrote:So it would be an easy search/replace job Gecko->Goanna and Firefox->Basilisk?
Is that a common problem, i.e. will more legacy extenstions be incompatible simply due to the renamed browser/renderer?

Unfortunately, there is no universal rule. This happens is according to the context.

Sun42
Apollo supporter
Apollo supporter
Posts: 30
Joined: Sat, 26 Sep 2015, 16:28
Location: Here

Re: Basilisk maff/mhtml compatibility?

Postby Sun42 » Sun, 03 Dec 2017, 22:17

Sun42 wrote:So it would be an easy search/replace job Gecko->Goanna?


Quoting myself: Yes, it indeed is as simple as that - I just hacked the latest 5.2.0 version and additionally removed the warning messege about legacy addons being phased out - see attachment.

GMforker wrote:And elsewhere (e.g. when associating file extensions) - distinguishes "only" between Firefox and SeaMonkey.


It looks like the dedicated Firefox check in 5.2.0 is only there to annoy users, for everything else it falls back to Firefox "if not SeaMonkey" - I just renamed it to Basilisk for cosmetic purposes. If the isSeaMonkey() check could be extended to tell apart Firefox/Basilisk, the addon could be universal for Gecko and Goanna.

GMforker
Lunatic
Lunatic
Posts: 497
Joined: Thu, 27 Aug 2015, 06:29
Location: Czech Republic

Re: Basilisk maff/mhtml compatibility?

Postby GMforker » Mon, 04 Dec 2017, 04:26

Sun42 wrote:I just renamed it to Basilisk for cosmetic purposes.

The result: New "BasiliskMAFF"/"BasiliskMHTML" (or "FirefoxMAFF"/"FirefoxMHTML") key will be created in the registry (for Windows).

Sun42
Apollo supporter
Apollo supporter
Posts: 30
Joined: Sat, 26 Sep 2015, 16:28
Location: Here

Re: Basilisk maff/mhtml compatibility?

Postby Sun42 » Mon, 04 Dec 2017, 09:16

GMforker wrote:
Sun42 wrote:I just renamed it to Basilisk for cosmetic purposes.

The result: New "BasiliskMAFF"/"BasiliskMHTML" (or "FirefoxMAFF"/"FirefoxMHTML") key will be created in the registry (for Windows).


Yeah, sure, I do understand how file associations work - but is it a bad thing to not use Firefox even if it's the same guid? The extension code already uses SeamonkeyMAFF for that browser, and another spammed registry entry on windows for Basilisk doesn't really make a difference, does it?

Sun42
Apollo supporter
Apollo supporter
Posts: 30
Joined: Sat, 26 Sep 2015, 16:28
Location: Here

Re: Basilisk maff/mhtml compatibility?

Postby Sun42 » Mon, 04 Dec 2017, 20:41

I just recognized the hacked 5.2.0 doesn't open multi-page maff on Basilisk, but 5.0.0 does. The modiified xpi is attached (which might or might not do what it says it does, or will send me all your passwords - that's what you get without extension signing enforcemen :-p)



Moderator EDIT: Remove incorrectly forked XPI

Sun42
Apollo supporter
Apollo supporter
Posts: 30
Joined: Sat, 26 Sep 2015, 16:28
Location: Here

Re: Basilisk maff/mhtml compatibility?

Postby Sun42 » Tue, 05 Dec 2017, 11:58

Sun42 wrote:Moderator EDIT: Remove incorrectly forked XPI

If anyone wants to have a working maff/mhtml you obviously have to do yourselves what I did above:

1. download 5.0.0 (newest 5.2.0 has issues with multi-page maff)
2. un-zip the xpi
3. search/replace though files: replace Gecko-> with Goanna-> (and change name FirefoxMAFF to BasilskMAFF if you like)
4. disable the legacy warning (search for ff version check)
5. change the line where the addon disables saving on newer ff versions
6. change/ammend addon name and update version to avoid confusion
7. in future Basilisk versions maybe adapt compatibility in install.rdf so you don't have to force-install
8. for Basilisk, throw out SeaMonkey and Firefox 56-specific code (which is quite a lot, search for isSeaMonkey)
9. re-zip into a xpi
10. re-install or replace in profile's extension directory. Disable version check at least on this addon.

If you depend on mhtml/maff and have a lot of saved legacy content, I hope this helps you to use Basilisk as much as it did for me!
Last edited by Moonchild on Tue, 08 May 2018, 22:11, edited 1 time in total.

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 798
Joined: Sun, 15 May 2016, 05:00
Location: bitterly cold upstate NY
Contact:

Re: Basilisk maff/mhtml compatibility?

Postby gracious1 » Thu, 07 Dec 2017, 14:22

Image“Life is what happens to us while we are making other plans.” ― Allen Saunders

kkurt
New to the forum
New to the forum
Posts: 2
Joined: Fri, 16 Sep 2016, 18:19

Re: Basilisk maff/mhtml compatibility?

Postby kkurt » Fri, 15 Dec 2017, 04:44

Sun42 wrote:5. change the line where the addon disables saving on newer ff versions


can you point the direction for this step, or post your version?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 20996
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: Basilisk maff/mhtml compatibility?

Postby Moonchild » Sat, 16 Dec 2017, 19:22

If there is a desire for a modified version of the extension, the person9s) responsible for the modifications should make a proper fork (compatible with Pale Moon and Basilisk that both use Goanna) and publish it on addons.palemoon.org
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

conzeit
Newbie
Newbie
Posts: 6
Joined: Mon, 26 Feb 2018, 21:24

Re: Basilisk maff/mhtml compatibility?

Postby conzeit » Mon, 26 Feb 2018, 22:19

what is the current status on this? I am a firefox user, who was dismayed at the announcement of WEBM only extension support, mostly because of MAFF, came to Pale moon and then Basilisk because of this. Currently using Firefox ESR but would rather have a permanent solution, I am waiting for basilisk to actually implement an official MAFF replacement to make the full switch, but it is impossible when both MAFF and Mozarchiver are not really working

Trapper852
Apollo supporter
Apollo supporter
Posts: 46
Joined: Fri, 29 Jan 2016, 00:21

Re: Basilisk maff/mhtml compatibility?

Postby Trapper852 » Wed, 28 Feb 2018, 04:31

@conzeit
the MAFF format does work in Basilisk (both saving & opening), but, until someone actually makes a proper fork of it, you'll need to modify the original "mozilla_archive_format v5.0.0-fx+sm.xpi" yourself.

Sun42 posted the basics of what needs to be done to make it compatible with Basilisk here:
viewtopic.php?f=61&t=17622#p129294

It works fine, I've done it myself

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 20996
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: Basilisk maff/mhtml compatibility?

Postby Moonchild » Wed, 28 Feb 2018, 15:14

Of note, to reduce compatibility issues we will use "Gecko-content-viewers" and similar gecko* function names in future versions of Basilisk on UXP. Although still based on Goanna, there's no real reason to break compatibility more than necessary for exposed APIs by having them renamed (and there's hardly a trademark issue when it comes to function names, either).
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

conzeit
Newbie
Newbie
Posts: 6
Joined: Mon, 26 Feb 2018, 21:24

Re: Basilisk maff/mhtml compatibility?

Postby conzeit » Fri, 09 Mar 2018, 23:13

Ok, I understand this is how it must be for now. Thing is I am not a programmer, I enjoy open source software and privacy respecting software but I dont ever modify components, looking for lines and whatnot.

for example the guide Sun42 posted just say "replace trough files" is there a special tool to do this in a batch? am I expected to open every file in notepad and look for this? am I expected to know which files need this replaced?

also another step "disable legacy warning" no idea how to do that. " change the line where the addon disables saving on newer ff versions" I dont know where to look for that. The rest of the stuff I guess is optional, but even for just getting an usable addon there's a lot of stuff to figure out for me.

I suppose the basilisk community is on avarage more heavily involved with FOSS than I am, actively developing addons and familiar with code and making their own modifications to xpis and other browser components.

I guess I'll slowly try to go trough every step bit by bit, hope an official BAFF comes out soon.
Last edited by conzeit on Fri, 09 Mar 2018, 23:14, edited 3 times in total.

Trapper852
Apollo supporter
Apollo supporter
Posts: 46
Joined: Fri, 29 Jan 2016, 00:21

Re: Basilisk maff/mhtml compatibility?

Postby Trapper852 » Sun, 11 Mar 2018, 03:32

@conzeit
You can download a free program called Notepad++
This is a source code editor that will make your life much easier. Open each individual fie in Notepad++, then search for each name you want to change in the opened file. If it exists, Notepad++ will tell you how many instances there are & their line numbers. Then make the appropriate changes.

If I recall correctly, the greatest majority of changes needed are in these files:

chrome\content\loading\DocumentLoaderFactory.js
chrome\content\startup\StartupInitializer.js
install.rdf

I'm not a coder by any means, but I had a working copy in about 1 hour.

I'd share my fixed copy, but that isn't allowed here.

conzeit
Newbie
Newbie
Posts: 6
Joined: Mon, 26 Feb 2018, 21:24

Re: Basilisk maff/mhtml compatibility?

Postby conzeit » Wed, 25 Apr 2018, 04:11

so I just got auto updated to the new basilisk and it's now not allowing me to save page as MAFF and asking me to convert .html like Firefox did. this is discouraging after figuring out the correct way to use the MAFF extension with basilisk. How can I roll back ? should I move over to pale moon or disable updates on basilisk to avoid regressive updates?

conzeit
Newbie
Newbie
Posts: 6
Joined: Mon, 26 Feb 2018, 21:24

Re: Basilisk maff/mhtml compatibility?

Postby conzeit » Tue, 08 May 2018, 19:31

So I set about figuring out how to get MAFF working again and this is what I did.

-reinstalled Basilisk from the .zip portable on which I had a working maff, but with a clean profile
-I didnt know Basilisk was preset to auto update, set it to inform me of updates so that it doesnt ruin my setup next time.
-MAFF extension is also is preset to auto update, disabled that. This ruins it automatically
-went into the profile folder with brokenMAFF, installed all the extensions by selecting the .xpi in the profile/extensions folder, except of course the one that corresponds to MAFF
-I copied every file on the profile folder root,except for extensions.json extensions.ini (using portable build) as prefs.js. MAFF will work and I pretty much have the same profile, just have to reinstall the visual theme.

The only remaining issue is that the extensions will still ask me to update MAFF to make it unusable because it wont be supported in current or future firefox builds.I think now I understand why the Pale Moon version of MAFF has a different name...sheesh.
Last edited by conzeit on Tue, 08 May 2018, 19:36, edited 1 time in total.


Return to “Basilisk”

Who is online

Users browsing this forum: No registered users and 2 guests