K-Meleon

KMeleonWiki > Resources > MacroLibrary > MacroLibrary2 > Domain Completion

Submitted by: Romanito & jsnj



Notes:

These macros extend the default domain completion behavior in K-Meleon 0.8.2. By default, pressing Ctrl+Enter while in the URL bar adds "http://www." and ".com" to the text. Here's how to add custom completions using Ctrl+Alt+Enter and Ctrl+Shift+Enter. Of course, you can customize the prefixes and suffixes to suit your needs. This also fixes the problem with URL bar not being updated.


In Macros:

In the # URL BAR MACROS section, replace the ctrl_enter macro with the following:

dom_complete{
$old = getclipboard(); id(ID_SELECT_URL); id(ID_EDIT_COPY);
$theurl = getclipboard(); $fullurl = $prefix . $theurl . $suffix; 
setclipboard($fullurl); id(ID_EDIT_PASTE); id(ID_NAV_GO); setclipboard($old); 
}
ctrl_enter{
$prefix = "http://www."; $suffix = ".com"; &dom_complete;
}
ctrl_alt_enter{
$prefix = "http://www."; $suffix = ".net"; &dom_complete;
}
ctrl_shift_enter{
$prefix = "http://www."; $suffix = ".org"; &dom_complete;
}


In Accelerators:

At the bottom of the file, in the %ifplugin macros section, add the following highlighted text:

%ifplugin macros
CTRL VK_RETURN = macros(ctrl_enter)
CTRL ALT VK_RETURN = macros(ctrl_alt_enter)
CTRL SHIFT VK_RETURN = macros(ctrl_shift_enter)
%endif


User Comments:

Thanks for this. Supplies very important functionality, particularly for us non-Americans who need a quick route to something other than ".com".

K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.