General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Open external links in Firefox?
Posted by: Michael Sattler
Date: March 01, 2023 07:45AM

Hello,

I use KM in a controlled environment (webshop backend).
Everything works fine, but when it's about to surf external websites, it comes to the problem, that some modern websites using javascript are not displayed properly.

The delayed KM engine updates are not the issue here.

But is it possible, that an external link (of which I have control over the html href link code) clicked in KM opens in Firefox?

This would solve the problem.


Thank you
Michael

Options: ReplyQuote
Re: Open external links in Firefox?
Posted by: JohnHell
Date: March 01, 2023 10:19PM

Quote
Michael Sattler

But is it possible, that an external link (of which I have control over the html href link code) clicked in KM opens in Firefox?


Directly, no. In the past I tried to hook/change the default left-click behaviour and... well, lets say that it wasn't a good idea... (somewhere in the forum are my experiences).

But, right-clicking and using a menu entry to do that, yes.

As this is the second time in a few weeks someone asks a similar question... I attach a modified version of the default ie.kmm macro so it can be used with Firefox (actually, with anything, if you know how to edit macros). Might be some similar macro in the forum or elsewhere but I'm unable to find it right now.

The macro command attaches a menu entry to Send To submenu in the context menu. As it does the default ie.kmm (for Internet Explorer).


Before you start using it, you need to change this line with your current path to Firefox with double slashes instead one, this is "c:\program files\" becomes "c:\\program files\\":

$_FireFox_path = "";

Change the content of the double quotes with the path to your firefox executable + %1

$_FireFox_path = "x:\\path to firefox\\firefox.exe %1";

I removed the default pseudo automation for the executable path because, after all, the magic of Gecko browsers is that they don't depend on an specific path and the original macro wasn't strictly useful for an alternate browser to Internet Explorer.


Note that this is quick edit range">find&replace and I haven't tested it as I don't use Firefox myself on this system. But should work. Anyway, is offered AS-IS.

Also, if anyone wants to use it, remember that you'll have to replace the word Firefox on lots of places in the macro. But, please, if you don't have macro knowledge, try to avoid it, or have a look to the documentation pages.


This should have been on Extensions forum, but it is not macro for general usage. It is just a lazy conversion.



Edited 2 time(s). Last edit at 03/01/2023 10:24PM by JohnHell.

Attachments: firefox.kmm (1.9 KB)  
Options: ReplyQuote
Re: Open external links in Firefox?
Posted by: Michael Sattler
Date: March 02, 2023 08:13AM

Thank you so much John, it works!

Is there a way to move the menu item from the SendTo-submenu to the top of the right-click menu?

Options: ReplyQuote
Re: Open external links in Firefox? / Macro "OpenFirefox"
Posted by: siria
Date: March 02, 2023 06:06PM

Couldn't resist (old macro junkie ;P), have changed and renamed it and added explanations inside, trying to make it as easy as possible as a template-macro for "Open any exe-tool" stuff. In theory should work in newer browsers too, but not tested yet?

(installation as usual, download the kmm-file into a macros folder and restart.
Or remove to uninstall, no traces left)
http://kmeleonbrowser.org/forum/file.php?1,file=2092,filename=OpenFirefox.kmm

Edit: as usual, it keeps growing with gimmicks...
New: if the URL starts with "mailto" or "javascript" etc, a popup asks for confirmation (with input field)



Edited 5 time(s). Last edit at 03/02/2023 09:41PM by siria.

Attachments: OpenFirefox.kmm (5.2 KB)  
Options: ReplyQuote
Re: Open external links in Firefox?
Posted by: JohnHell
Date: March 02, 2023 10:21PM

Quote
Michael Sattler
Thank you so much John, it works!

Is there a way to move the menu item from the SendTo-submenu to the top of the right-click menu?

Replace, on either macro file (my dumb fix or siria's enhancement):

$_SendTo_Link

To:

"LinkPopup"


Options: ReplyQuote
Re: Open external links in Firefox?
Posted by: Michael Sattler
Date: March 02, 2023 10:32PM

Again thank you, John!

It works, but the entry is at the bottom of the right-click menu.

Is there a way to place it at the top?

Options: ReplyQuote
Re: Open external links in Firefox?
Posted by: JohnHell
Date: March 02, 2023 10:40PM

I swear I knew you were going to ask that XD

At the line when you replaced the above, before the closing parenthesis, add a ", 0" (without the quotes a comma and an integer index).

Note, anyway, that the index won't work always, as it depends on several factors.

Reference:
setmenu macro language function documentation



Edited 3 time(s). Last edit at 03/02/2023 10:44PM by JohnHell.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.