Basilisk maff/mhtml compatibility? Topic is solved

Board for discussions around the Basilisk web browser.

Moderator: Basilisk-Dev

Sun42

Basilisk maff/mhtml compatibility?

Unread post by Sun42 » 2017-12-03, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by GMforker » 2017-12-03, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by Sun42 » 2017-12-03, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by ianas » 2017-12-03, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by GMforker » 2017-12-03, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by Sun42 » 2017-12-03, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by GMforker » 2017-12-04, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by Sun42 » 2017-12-04, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by Sun42 » 2017-12-04, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by Sun42 » 2017-12-05, 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 2018-05-08, 22:11, edited 1 time in total.

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 891
Joined: 2016-05-15, 05:00
Location: humid upstate NY

Re: Basilisk maff/mhtml compatibility?

Unread post by gracious1 » 2017-12-07, 14:22

20 July 1969 🌗 Apollo 11 🌓 "One small step for [a] man, one giant leap for mankind." 🚀

kkurt

Re: Basilisk maff/mhtml compatibility?

Unread post by kkurt » 2017-12-15, 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: 35479
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Basilisk maff/mhtml compatibility?

Unread post by Moonchild » 2017-12-16, 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
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

conzeit

Re: Basilisk maff/mhtml compatibility?

Unread post by conzeit » 2018-02-26, 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

User avatar
Trapper
Fanatic
Fanatic
Posts: 113
Joined: 2016-01-29, 00:21

Re: Basilisk maff/mhtml compatibility?

Unread post by Trapper » 2018-02-28, 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: 35479
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Basilisk maff/mhtml compatibility?

Unread post by Moonchild » 2018-02-28, 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).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

conzeit

Re: Basilisk maff/mhtml compatibility?

Unread post by conzeit » 2018-03-09, 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 2018-03-09, 23:14, edited 3 times in total.

User avatar
Trapper
Fanatic
Fanatic
Posts: 113
Joined: 2016-01-29, 00:21

Re: Basilisk maff/mhtml compatibility?

Unread post by Trapper » 2018-03-11, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by conzeit » 2018-04-25, 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

Re: Basilisk maff/mhtml compatibility?

Unread post by conzeit » 2018-05-08, 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 2018-05-08, 19:36, edited 1 time in total.

Locked