Creating an extension for Pale Moon.

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
Piotr Kostrzewski
Lunatic
Lunatic
Posts: 280
Joined: 2018-08-14, 15:08

Creating an extension for Pale Moon.

Unread post by Piotr Kostrzewski » 2023-06-10, 09:02

Hello .
I would like to try to create an extension for Pale Moon. First for myself to see if I can do it at all. Is there an SDK that should be used?
Thank you very much for your time.
Regards,
Piotrek

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 939
Joined: 2021-01-26, 11:18

Re: Creating an extension for Pale Moon.

Unread post by Kris_88 » 2023-06-10, 09:16

The SDK hides the essence and hinders rather than helps. I recommend not to use SDK.
Just take some small extension as an example and read the documentation.
https://udn.realityripple.com/docs/Arch ... Extensions
https://udn.realityripple.com/docs/Arch ... extensions

User avatar
Piotr Kostrzewski
Lunatic
Lunatic
Posts: 280
Joined: 2018-08-14, 15:08

Re: Creating an extension for Pale Moon.

Unread post by Piotr Kostrzewski » 2023-06-10, 09:27

Kris_88 wrote:
2023-06-10, 09:16
The SDK hides the essence and hinders rather than helps. I recommend not to use SDK.
Just take some small extension as an example and read the documentation.
https://udn.realityripple.com/docs/Arch ... Extensions
https://udn.realityripple.com/docs/Arch ... extensions
Thanks a lot. I want to create a specific extension. I found one of this type but it is WebExtension. Therefore I would like to know if there is any 'base' of code that can be used to reflect what it does but for Pale Moon.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 939
Joined: 2021-01-26, 11:18

Re: Creating an extension for Pale Moon.

Unread post by Kris_88 » 2023-06-10, 09:51

Pale Moon does not support interface for webextensions. In any case, the features that are available for webextensions are just pitiful scraps of what browsers have inside.
As far as I know, there is no automatic method for converting a webextension to XUL or bootstrapped extension.

User avatar
Piotr Kostrzewski
Lunatic
Lunatic
Posts: 280
Joined: 2018-08-14, 15:08

Re: Creating an extension for Pale Moon.

Unread post by Piotr Kostrzewski » 2023-06-10, 10:06

Kris_88 wrote:
2023-06-10, 09:51
Pale Moon does not support interface for webextensions. In any case, the features that are available for webextensions are just pitiful scraps of what browsers have inside.
As far as I know, there is no automatic method for converting a webextension to XUL or bootstrapped extension.
I know it. I guess I expressed myself wrong. I mean that, for example, in creating websites, the same effect can be achieved differently in HTML and differently using HTML5 (this is the first comparison that came to my mind). I prefer to create the extension myself without automation.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 939
Joined: 2021-01-26, 11:18

Re: Creating an extension for Pale Moon.

Unread post by Kris_88 » 2023-06-10, 10:17

It's clear.
In fact, there is more than enough information ...
But I'm afraid you won't find a minimum set of how-to specifically for your task ...

User avatar
Piotr Kostrzewski
Lunatic
Lunatic
Posts: 280
Joined: 2018-08-14, 15:08

Re: Creating an extension for Pale Moon.

Unread post by Piotr Kostrzewski » 2023-06-10, 10:21

Possibly, if I fail, well, it's not a prime need extension.But I can try.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 939
Joined: 2021-01-26, 11:18

Re: Creating an extension for Pale Moon.

Unread post by Kris_88 » 2023-06-10, 10:32

Certainly.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2193
Joined: 2018-05-05, 13:29

Re: Creating an extension for Pale Moon.

Unread post by vannilla » 2023-06-10, 14:06

Some tips:
  • Making a bootstrapped extension is not worth it; make one only if the extension will work in the background without any user interface beyond what the add-ons manager provide
  • Always "namespace" your javascript functions: basically just do const MyExtensionNamespace = {}; and then add your stuff as properties of that object
  • Always add an entry in one of the menus if the extension has a user interface, even if you provide a toolbar button
  • Learn how to use the Xref at xref.palemoon.org

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4981
Joined: 2015-12-09, 15:45

Re: Creating an extension for Pale Moon.

Unread post by moonbat » 2023-06-16, 09:13

Start with the XUL School Tutorial for a step by step guide to building an extension, and the XUL Tutorial for more advanced functions.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX