Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
Macro open selected text as URL in new tab
Posted by: baysao
Date: May 11, 2008 10:21AM

In main.kmm, there is function "Open as URL" selected text in focus windows(tab). Sometime i want to open this text in other tab. So i wrote this macro .
Hoping useful.
Quote

# Macro name: OpenAsURLInNew.kmm
# Author: Thanh Vu(baysao@gmail.com)
# Macro help open selected text in new tab
# Macro depend macro main.kmm

Open_TextAsURLInNew{
$OpenURL=$SelectedText; $OpenURL==""?0yawning smileypentab($OpenURL);
}

# - PRIVATE
_OpenAsURLInNew_BuildMenu{
setmenu(Selection,macro,"Open As URL in &New",Open_TextAsURLInNew);
}

$OnInit=$OnInit."_OpenAsURLInNew_BuildMenu;";


Options: ReplyQuote
Re: Macro open selected text as URL in new tab
Posted by: JujuLand
Date: May 11, 2008 12:38PM

ok, but you must add this line at the end of your macro to allow K-Meleon to manage macros.

# ------------------------------------------------------------------------
$macroModules=$macroModules."OpenAsURLInNew;";

if obviously your kmm is named OpenAsURLInNew.kmm

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: Macro open selected text as URL in new tab
Posted by: desga2
Date: May 11, 2008 01:12PM

Coded added to MacroLibrary.

Thanks for shared coded.

- EDITED: 19/07/2008

Updated to work with 1.1.X and 1.5 versions and added new position in context menus.

K-Meleon in Spanish



Edited 1 time(s). Last edit at 07/19/2008 02:47PM by desga2.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.