Hi all,
If you have installed google toolbar on your internet explorer you may remeber that you can select any text in a document and select "google search" to search the selected text using google.
Here is how you can achive same functionality in kmeleon.
In macros.cfg add this macro
searchtext{
menu=Search google
open(javascript:self.location='
http://www.google.com/search?num=100&q='+document.getSelection());
}
In menus.cfg under document popup, add macros(searchtext)
Here is my documentpopup.
DocumentPopup {
&Back = ID_NAV_BACK
&Forward = ID_NAV_FORWARD
&Reload = ID_NAV_RELOAD
&Stop = ID_NAV_STOP
-
macros(searchtext)
Select &All = ID_EDIT_SELECT_ALL
Select &None = ID_EDIT_SELECT_NONE
&Copy Text = ID_EDIT_COPY
-
View So&urce = ID_VIEW_SOURCE
Save &Page As... = ID_FILE_SAVE_AS
%ifplugin fullscreen
-
&Preferences = ID_PREFERENCES
fullscreen(&Full Screen\tF11)
%endif
bmpmenu()
}
After reloading kmeleon you should see a new entry in th document popup menu. When you select a text and click google search, you will be able to search google for this text.
Note: you can write many similar macros, I have macros for searching deja.com, search current browsing site for a given text etc etc.
thanks
-sesh