How to add a Pale Moon application GUID to a Firefox extension

Post your tutorials for using Pale Moon or performing related tasks here.
Note: Not for "how do I...?" Questions!
Forum rules
Tutorials and Howtos should only relate to Pale Moon, and not to third party applications. e.g.: Don't post a Howto for configuring your firewall.
If you have a question how to do something, you should use one of the support boards, not this board. It is meant for people to document and post instructions.
Post Reply
coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2326
Joined: 2015-09-26, 04:51
Location: U.S.

How to add a Pale Moon application GUID to a Firefox extension

Post by coffeebreak » 2020-07-18, 01:39

This will explain how to open up an extension's xpi and use a text editor to add Pale Moon's application block to a file, install.rdf, that lives inside the extension.
The instructions are admittedly Windows-centric, because I don't have experience with Linux, or Mac.

WHAT YOU NEED IN ORDER TO DO THE EDIT:
  • A copy of your extension's xpi (cross platform installer);
    If you don't have one saved, you'll find a copy in the extensions folder in your browser profile. (To find your profile, go to Help -> Troubleshooting (about:support in the address bar) and click "Open Folder".) The files are named by their IDs, and some are hard to identify, but there is a list of Extension Names + IDs on your about:support page to help with that.
  • Archiver (zip/unzip) software, such as 7-Zip, WinRAR, PeaZip...etc. On Windows, there is also built-in functionality to extract from/send to a zipped archive. (I personally use 7-Zip.);
  • The Pale Moon application block, found in this tutorial, How to create a Pale Moon targeted extension
    (please read the entire tutorial for a better general understanding);
    For convenience, I've copied the application block here:

    Code: Select all

    		<em:targetApplication><!-- Pale Moon -->
    			<Description>
    				<em:id>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</em:id>
    				<em:minVersion>28.0</em:minVersion>
    				<em:maxVersion>28.*</em:maxVersion>
    			</Description>
    		</em:targetApplication>
  • A plain text editor;
    (I use Notepad++, but there are tons of others, including Windows' come-with Notepad. DO NOT use a word processor or rich text editor.)
**Make sure to do your edit to a copy of the xpi, so you'll have a backup in case of whatever.**

HOW TO EDIT:
  • Change the file extension of your xpi from ".xpi" to ".zip" (an xpi is just a zipped archive with a different file extension).
    Using DownThemAll as an example, downthemall-3.0.8-fx+sm.xpi becomes downthemall-3.0.8-fx+sm.zip.
  • Extract the contents of the zipped folder to a new folder/directory and give it the same name as your extension. (Your archiver software will probably just name it that way for you.)
    Below is DownThemAll, extracted:
  • The folder includes the file install.rdf. You need to add the Pale Moon application block to install.rdf with your plain text editor.
    dta-extracted.png
  • Open install.rdf with your text editor.
    Slowly scroll down until you see application blocks for other browsers.
    The block for Pale Moon will be added to the same section.
    You can add Pale Moon to the others, or replace them with Pale Moon - your choice.

    DownThemAll -> install.rdf --
    Application blocks start where marked:
    dta-install.rdf.png

    PM application block has been added:
    dta-install.rdf2.png
  • Save install.rdf and close the file.
  • If your extension includes a folder called META-INF, delete that folder.
  • Select all of the files inside your "extracted" folder, including the edited install.rdf, and zip them up.
    Be careful NOT to include the containing folder in the new zipped archive.
    dta-zip-the-contents.png
  • Change the archive's file extension from ".zip" to ".xpi" - and you're done.
    Just drag your newly minted xpi onto the browser to install.


A FINAL WORD:
When eventually the dual GUID system is removed from Pale Moon, the above procedure will make it possible to install formerly Firefox-only extensions. However it does not guarantee true underlying compatibility, nor that the extension will actually work properly. This will vary by extension, and/or over time as external factors change.
Last edited by coffeebreak on 2020-07-18, 06:25, edited 2 times in total.

User avatar
athenian200
Lunatic
Lunatic
Posts: 284
Joined: 2018-10-28, 19:56
Contact:

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by athenian200 » 2020-07-18, 02:24

Thank you for writing this up, coffeebreak! I was thinking about doing something like that after I figure out the CSS parser, but you got it done already. Hopefully this helps some people out who are trying to figure out where to get started with keeping their extensions working. Honestly, it kinda clarifies a few questions I had about the process... I had the general idea, but this lays it all down pretty solidly.
"The rising sun will eventually set
A newborn's life will fade.
From sun to moon, moon to sun...
Give peaceful rest to the living dead."

— The Legend of Zelda: Ocarina of Time

User avatar
moonbat
Board Warrior
Board Warrior
Posts: 1896
Joined: 2015-12-09, 15:45

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by moonbat » 2020-07-18, 05:41

coffeebreak wrote:
2020-07-18, 01:39
If you don't have one saved, you'll find a copy in the extensions folder in your browser profile.
You might want to also mention the location of the profile folder on different platforms since apparently even that piece of arcane rocket science knowledge is privy only to 'developers' :roll:
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 20 Xfce x64 on HP i5 laptop with 12 GB RAM, always latest versions of PM & Basilisk unless specified.

User avatar
loxodont
Astronaut
Astronaut
Posts: 617
Joined: 2014-07-26, 23:03
Location: Mare Serenitatis

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by loxodont » 2020-07-18, 06:52

Thanks very much, coffeebreak! I think I'll give it another try (after many ... many fails:)
To the FINAL WORD, - I only read before that "some extensions can't be forked" like this, or just don't work - and perhaps I caught just these, which were mostly refused to be installed -, is there a way to find out if they're Firefox-only?

User avatar
moonbat
Board Warrior
Board Warrior
Posts: 1896
Joined: 2015-12-09, 15:45

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by moonbat » 2020-07-18, 07:05

loxodont wrote:
2020-07-18, 06:52
I only read before that "some extensions can't be forked" like this, or just don't work - and perhaps I caught just these, which were mostly refused to be installed -, is there a way to find out if they're Firefox-only?
The target application block determines what applications can use the extension, so technically all of these are Firefox only and they work here because PM recognizes Firefox's ID and allows it. If they were working for you with PM 28.10, they aren't going to magically break in 28.11, but it is inevitable as time passes that their code will need to keep up. But the first step for a start is in changing application ID to target Pale Moon and everyone can get started with at least doing that.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 20 Xfce x64 on HP i5 laptop with 12 GB RAM, always latest versions of PM & Basilisk unless specified.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2326
Joined: 2015-09-26, 04:51
Location: U.S.

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by coffeebreak » 2020-07-18, 09:06

loxodont wrote:
2020-07-18, 06:52
I only read before that "some extensions can't be forked" like this, or just don't work - and perhaps I caught just these, which were mostly refused to be installed -, is there a way to find out if they're Firefox-only?
That doesn't ring a bell.

All that "Firefox-only" would mean is that (at the moment) a Firefox application block is the only one currently inside some extension. Probably, you unknowingly made some misstep while editing the extension.

User avatar
loxodont
Astronaut
Astronaut
Posts: 617
Joined: 2014-07-26, 23:03
Location: Mare Serenitatis

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by loxodont » 2020-07-18, 17:20

coffeebreak wrote:
2020-07-18, 09:06
Probably, you unknowingly made some misstep while editing the extension.
Thanks for replies, guys...
Well, that's the magic key sentence here, which is nailed on my wall already. :lol: :lol:

@ moonbat: It's not about actual changes and magical breaks with 28.11. It's about the last years, or since it's clear that legacy add-ons have to be forked. I made several attempts in forking, tried to keep it exactly to the instructions here and elsewhere, but magically (to me) I got those messages in Pale Moon ( Basilisk, too) that the add-on "cannot be installed", mostly because "it seems to be damaged", sometimes "not compatible" or it could be installed, but didn't work without glitches.

But I'll try again! :D

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2326
Joined: 2015-09-26, 04:51
Location: U.S.

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by coffeebreak » 2020-07-18, 23:38

loxodont wrote:
2020-07-18, 17:20
I made several attempts in forking, tried to keep it exactly to the instructions here and elsewhere, but magically (to me) I got those messages in Pale Moon ( Basilisk, too) that the add-on "cannot be installed", mostly because "it seems to be damaged", sometimes "not compatible"
That's often caused by messing up the directory structure, by adding the surrounding (top level) directory of the unzipped extension to your new archive. It's extremely important to only zip up the contents, so that install.rdf and the like are in the root, the first thing you see if you open the archive.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 7574
Joined: 2012-10-09, 19:37
Location: Just beyond the Lament Configuration

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by New Tobin Paradigm » 2020-07-19, 07:52

Image
- Welcome to the worst nightmare of all... reality! -

User avatar
loxodont
Astronaut
Astronaut
Posts: 617
Joined: 2014-07-26, 23:03
Location: Mare Serenitatis

Re: How to add a Pale Moon application GUID to a Firefox extension

Post by loxodont » 2020-07-19, 19:02

Interim report: Installation of the *. xpi works now! :D
Like coffeebreak says, maybe zipping the whole extension folder from the outside caused the problem - not sure if I did that all the time.
But still that special extension lost some function, I'll have to look for.
Anyway, thx so far :thumbup:

Post Reply