Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
Really HOW are Firefox extensions installed and HOW to run them
Posted by: JohnHell
Date: January 10, 2015 07:55PM

I knew I shouldn't translate a guide without understanding exactly how the Firefox extensions are installed and run.

Trying to help Yago, an spanish user, I tried to install the 1-click youtube video download extension/addon and run it.

https://addons.mozilla.org/en-US/firefox/addon/1-click-youtube-video-downl/?src=search

Ok, you set the preference xpinstall.enabled and kmeleon.install_firefox_extension to true and that makes the magic... BUT, what now?

1-click video download addons shouldn't be a problem itself because it doesn't need a XUL window. Well, yes, it needs for configuration purposes, but can be accessed from about:addons, and that's not a big deal.

I said this because the main feature of this addon is to append through javascript some elements to the HTML page and that doesn't depend on any thing of XUL.

(and this addon doesn't have XUL interface at all as the addon I talked here a few weeks back that I'd like to be ported, if it is possible, but the functionality is the same)

So, my question is, why still doesn't work?

And the big questions are, why every Firefox extension generates 2 errors about kmeleon.js and load.kmm not found? Are they that important? what does kmeleon.js do? what does load.kmm do? (about this was a tiny reference in the past and no more) Are these errors the cause for the addons to not work? What is really needed to make some simple addons to work?

I'm asking, not only for myself, but because it's supposed that I know something about this, as I translated how is supposed to be installed and addon, and, actually, when I wrote, and still, I don't know anything about this topic. Anything. I just translated some spread info in the forum and what I thought it was the procedure.

I'm barely interested in Firefox addons, but, hell, I'm not closed to it, but as an user said in the general forum some weeks ago, the information is in portions, here and there, links here and there, and not actual information for dummies, and when someone doesn't know, and in this topic, I don't know, the information must be avalaible for dummies. It is quite spread along some threads and the forum search doesn't actually help.

I feel quite dumb trying to help Yago, when I don't know exactly how work this.

So, the subject of this topic: really HOW are Firefox extensions installed AND how to run them.

I know it is quite experimental, but, god, George Hall was able to do this big job adapting addons, shouldn't be that hard!!!

Or, just a simple answer, this addon can't work, but tell me why so I can test and I can help. I feel quite useless :/

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: George_Hall
Date: January 10, 2015 09:13PM

We need a way to right click or a way to click on flash or HTML5 Vodeos youtube videos so we can launch the 1-Click YouTube Video Download Firefox Extension

The line chrome://clickYoutubeD/content/clickYoutube_overlay.xul in the chrome,manifest must we what triggers downloads in the extensions.

Wihtout a way to select cideos with the line chrome://clickYoutubeD/content/clickYoutube_overlay.xul using a macro the extensions wwill nit work in K-Meleon 74.0 and K-Meleon 75.0 Beta 1

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: JohnHell
Date: January 10, 2015 09:32PM

This addon creates an html menu appended to the page when found a youtube page.

It isn't triggered by user interaction, but by page load interaction.


I will ask other way: what limits the execution of Firefox addons in K-meleon?

We can call XUL windows when needed with macros, but, this kind of execution that there is not direct interaction??? why not is autoexecuted?

I don't understand the reason that doesn't run the JS script.

Couldn't make and onload injectJS for clickYoutube_overlay.js? Wouldn't be enough?

I hate this language.



Edited 2 time(s). Last edit at 01/10/2015 09:39PM by JohnHell.

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: George_Hall
Date: January 10, 2015 11:25PM

Maybe 1-Click YouTube Video Download does not detect the video in K-Meleon 74.0 and K-Meleon 75.0 Beta 1.

Also Some feature or call to Firefox maybe needed to see the link to the video file.

An example of an extensios not being to see links would be Adblok Plus under K-Meleon 74.9 and K-Meleon 75.0 Beta 1 when trying to view "blockable items"

The lines chrome://adblockplus/content/ui/sidebarDetached.xul and chrome://adblockplus/content/ui/sidebar.xul are supposed open a window that list "blockabke itmes" (links) on webpage.

However "Open Blickable Itmes" with those lines only launches a window that does not list links on a webpage in K-Meleon 74.0 and K-Meleon 75.0 Beta 1

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: siria
Date: January 10, 2015 11:26PM

IIRC there was some issue with Mozilla forbidding to load local files for security reasons now, in newer geckos, but not sure in which KM version that started exactly. And then there was some CAPS workaround creating exceptions for localfiles...
But injectjs + onload by macro should work, since the youtube.ys is below the size limit. Then again, there come 5 scripts with that addon, perhaps those are needed too. That whole thing is way too complicated for me, sorry.

Options: ReplyQuote
 
Posted by: adodupan
Date: January 11, 2015 12:29AM

 



Edited 2 time(s). Last edit at 08/05/2019 08:32AM by adodupan.

Attachments: howtousejsbridge.v.1.0@adodupan.xpi (7.9 KB)  
Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: JohnHell
Date: January 11, 2015 12:59AM

Ok, thanks adodupan.

I was searching about how to run overlay.xul files and so on just to try to undertand and there is a missing component if I'm not wrong.


After this, I'd say now what I posted above, tell exactly the steps needed for, at least, be able to install addons.

Yesterday I edited several times the supposed "guide" in spanish because I wasn't sure of the methods. And I hope this thread keeps track of the actual status of how install them.

Looks like edit the install.rdf is not needed anymore. Is this right?

If it is not needed, the preference xpinstall.enabled and kmeleon.install_firefox_extension must be true. Is this right? Are both needed?

If we edit install.rdf, we don't need to set to true kmeleon.install_firefox_extension. Is this right? Are still both needed?

Is there any need of extraction of the XPI?, if we extract, must the name of that folder be the same as the installed addon name of the XPI?

EDIT: Is the interaction with the page, the limit for and addon to be usable?


All this is to warn people and let them understand (me included) what can be done and what can't be done.

Thanks to all.

I hope this helps to avoid the spread of the information.



Edited 1 time(s). Last edit at 01/11/2015 01:16AM by JohnHell.

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: guenter
Date: January 11, 2015 10:04AM

Quote
JohnHell
Ok, thanks adodupan.

I was searching about how to run overlay.xul files and so on just to try to undertand and there is a missing component if I'm not wrong.


After this, I'd say now what I posted above, tell exactly the steps needed for, at least, be able to install addons.

Yesterday I edited several times the supposed "guide" in spanish because I wasn't sure of the methods. And I hope this thread keeps track of the actual status of how install them.

Looks like edit the install.rdf is not needed anymore. Is this right?

If it is not needed, the preference xpinstall.enabled and kmeleon.install_firefox_extension must be true. Is this right? Are both needed?

If we edit install.rdf, we don't need to set to true kmeleon.install_firefox_extension. Is this right? Are still both needed?

Is there any need of extraction of the XPI?, if we extract, must the name of that folder be the same as the installed addon name of the XPI?

EDIT: Is the interaction with the page, the limit for and addon to be usable?


All this is to warn people and let them understand (me included) what can be done and what can't be done.

Thanks to all.

I hope this helps to avoid the spread of the information.


Sorry I was absent from Forum.


1.) Editing install.rdf of Firefox Add-on is not needed any more since 74RC2 or so. Dorian build into IMHO the newer K-Meleon.exe a pref: kmeleon.install_firefox_extension that can be set true.

If You use older K-Meleon versions editing is still needed.

For newer K-Meleons You can either edit or set the pref true.
(You could for example for security reasons switch it off and manually install add-ons that have edited install.rdf)

I have not yet tested with an Add-On that are not for Firefox.

When I once switched kmeleon.install_firefox_extension off for a test the add-ons in ./K-Meleon/browser/extensions stayed active and those in ./used profile/extensions disappeared from about:addons but were not deleted. But You would have to test for Yourself. Since I use add-ons that manipulate compatibility checking. Do a backup. I already lost add-ons in the profile during experiments.

2.) xpinstall.enabled = true AFAIK activates that Add-Ons can be installed.
That pref is for all applications that use Mozilla GRE e.g. Firefox, Xulrunner.

kmeleon.install_firefox_extension = true AFAIK activates that newer K-Meleon versions can use Firefox Add-Ons without edited install.rdf.

In some cases I have been even able to install from the extension pages. No idea why - except that I have add-ons installed that suppress compatibility checking etc. But manual install is IMHO still the rule. Maybe George knows more.

3.) Unpack XPI. For most Add-Ons it does not matter whether they are unpacked or not.

It is governed/indicated by a pref/setting that is in the install.rdf.

Example from ExExceptions:

<em:unpack>false</em:unpack>

Example from FEBE

<em:unpack>true</em:unpack>

So. Some must be unpacked and some must not be unpacked to work properly.

I think the doubt lingers because some of the first add-on needed unpacking.

4.)
Quote
from **A Short History of Firefox Add-ons with K-Meleon
**Add-On are not working more often than working. Why?

They are Firefox add-ons after all. Firefox' GUI is XUL based, K-Meleon's is not. Any add-ons that manipulate the GUI will not work. This includes functions in an add-on that otherwise would work. No button in a bar/GUI, nor the connection from an add-on to the browser or a tab/window will work if it relies on an element that belongs to the GUI.

No go. You will probably not even get a message from the console2.

That is what I know about it. This recent problem story with the overlay is IMHO a typical case.

p.s. As You see: that add-ons often do not work was at some time in our Wiki.
But it has been scrapped.



Edited 1 time(s). Last edit at 01/11/2015 12:36PM by guenter.

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: JohnHell
Date: January 11, 2015 07:18PM

Just the 2 remaining questions:

"And the big questions are, why every Firefox extension generates 2 errors about kmeleon.js and load.kmm not found? Are they that important? what does kmeleon.js do? what does load.kmm do? (about this was a tiny reference in the past and no more)"

I understand in the 4th question above you replied, guenter, that the addons that work will be those that use functionalities that not interact with any thing. Just network functionalities, or permissions, or similar behaviors, but not direct input with any thing.

And I'll edit the first post here and the one in spanish to what I understood.

Let's hope this resolves the doubts for everyone trying to understand what fails, what to install, how to install in just one topic.



Edited 2 time(s). Last edit at 01/11/2015 07:21PM by JohnHell.

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: JohnHell
Date: January 15, 2015 05:56PM

I guess no one knows the above confused smiley

I was just waiting for an answer to edit.



Edited 1 time(s). Last edit at 01/15/2015 05:56PM by JohnHell.

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: vtsnaab
Date: March 06, 2015 05:46AM

Is there posted someplace a complete guide to using XPI files with 74 ?

Searching brings many results, each with a little info.

I found about setting the 2 items in About:Config to true and there is mention also of a needed macro...

Would someone please point to where this is all explained if such exists ??

Thanks.

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: rodocop
Date: March 06, 2015 06:39AM

Sorry, there is no one guide as this cannot be done.

There are very different types of contents into xpi-files (if look from the KM point of view).

Well, I'll try.

1) Any xpi itself can be installed in newest builds (at least in last KM75 beta versions - b2, b3) just like in Firefox: directly from the Mozilla Addons pages or from file saved to disk.
You control all this at about:addons page (same as one from FF).

2) Then difference begins:
- some FF-extensions don't need any GUI (user interface) or can be fully or partly managed through Options called from about:addons - these we can call 'working in KM' as they do their job once installed;
The examples are things like Bluhell Firewall and other background services, Adblock Edge (partly managed), etc.

- some other need GUI-integration like buttons and menu items and that could be reproduced with KM native way - by KM-macros. Many old adapted things like Newsfox or AdBlock Plus work this way here. There are dozens of macros, making FF-extensions be managed in KM (thanks to George Hall and other contributors).
And going deeper into this you also could produce (after some training) some new integration for more FF-addons.

- but some addons do have so special integration into FF-GUI that couldn't be easily reproduced here in KM, so you shouldn't wait them being usable in our browser unless we got some capable developer who will be able to replace XUL-integration with something like JS (like bookmarklets work) or other way.

One of such useful addons is gTranslate which is much more convenient than native KM translate macro tool but I don't see the way to bring it here to us now.

Options: ReplyQuote
Re: Really HOW are Firefox extensions installed and HOW to run them
Posted by: guenter
Date: March 06, 2015 07:12PM

Now let's add some small print.

kmeleon.install_firefox_extension set to true makes for example that 74 is recognized as Firefox 24. AFAIK 75 is Firefox 31.

And install rdf dictates what Firefox versions are compatible.

If version inside it is:

<!-- Target Application this extension can install into,
with minimum and maximum supported versions. -->

<em:minVersion>3.6</em:minVersion>
<em:maxVersion>4.0.*</em:maxVersion>

The addon will complain and not work because because FF 24 and 31 is too high.

There are two ways to pass this hurdle.

Add to install.rdf inside each addon's xpi.

<em:targetApplication>
<Description><!K-Meleon>
<em:id>kmeleon@</em:id>
<em:minVersion>74.0</em:minVersion>
<em:maxVersion>74.0</em:maxVersion>
</Description>
</em:targetApplication>

Else. We do it once and for all. Since not all add-ons are made for this version we can suppress most compatibility checking by using the FireFox add-on "checkcompatibility".

https://addons.mozilla.org/firefox/addon/checkcompatibility/

If an addon still does not install. Download addon, create folder

\browser\extensions\

Check ID inside install.rdf (in XPI of addon) whether the download of the
addon has the correct name. Edit name of download.xpi if needed. Example:

<em:id>{145e79b6-6c19-4b9c-915a-45c90a2f06a5}</em:id>

So this would be the folder name and location if unpacked.

\browser\extensions\ {145e79b6-6c19-4b9c-915a-45c90a2f06a5}

And this the same for the xpi.

\browser\extensions\ {145e79b6-6c19-4b9c-915a-45c90a2f06a5}.xpi


If the about:addons does not give us an option to access an addon's functions we look inside xpi (zip compressed) or folder ./chrome/content/ (which can be inside a jar / zip compressed). The path can be looked up in ./chrome/chrome.manifest


Example chrome://cookiekeeper/content/ for an alternative.

After some tries we find:

chrome://cookiekeeper/content/cookiekeeper.xul

Copy and paste it into URL and go there. It can be bookmarked if You do not know yet to make a macro. I always use the bookmark/hotlist entry since I am too lazy to create a macro.

p.s. As said before: Add-On not working more often than working. Why?

They are Firefox add-ons after all. Firefox' GUI is XUL based, K-Meleon's is not. Any add-ons that manipulate the GUI will not work. This includes functions in an add-on that otherwise would work. No button in a bar/GUI, nor the connection from add-on to browser if it is relying on an element that belongs to the GUI.

No go. You will probably not even get an error message from the console2.



Edited 1 time(s). Last edit at 03/06/2015 07:32PM by guenter.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.