General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
is possible to configure the "about:home" page ?
Posted by: monkeymoon
Date: November 27, 2017 08:04PM

hello
i would like to modify the search bar of the 'about:home" page (this with the kameleon pic :droolsmiling smiley
actually configured on "i'm lucky" by default
to "Google" by default (or another...)
thanks

Options: ReplyQuote
Re: is possible to configure the "about:home" page ?
Posted by: J.G.
Date: November 27, 2017 11:16PM

It's a nice question, however I always set manually to Google when the page appears -- only one second to choose it when I need this function. :s

Options: ReplyQuote
Re: is possible to configure the "about:home" page ?
Posted by: monkeymoon
Date: November 28, 2017 06:30AM

Perhaps is it possible to access the code ?

Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: siria
Date: November 28, 2017 11:02AM

No one...?
I'm on an old system currently and can't run 76 myself, but first guess would be:


perhaps the search engine is automatically your chosen default engine?
Which one is that - Lucky google? What if you change it?
(the funny things is, am not quite sure where to set this in KM76, sorry... Try right-clicking the search button (little globe, this opens a menu) or use F2>Finding Websites (but the bottom field is another option, not the default engine)


Second guess:
Save a copy of the home page locally, edit it, open it in the browser again and set this copy as your new home page.
Howto: Right-click on the Home-button, it shows the config menu.


Third guess:
googling a bit for Firefox and about:home brings up this very interesting link:
https://mike.kaply.com/2013/05/06/dont-unpack-and-repack-omni-jar/
Seems like a Mozilla dev is explaining all sorts of handy tricks how to edit default stuff hardcoded inside omni.ja, without actually needing to edit omni.ja itself!
One of the user questions is exactly yours too, how to customize about:home?
Now, it looks like there's no such trick to edit about:home as easily as the other stuff, but no prob. At least it reveals where to find the files, if you unzip omni.ja:
K-Meleon\browser\ omni.ja\chrome\kmeleon\content\kmeleon\aboutHome

And there, its js-file confirms again my very first guess: the search engine is just your chosen default engine!
Its source code uses this pref: "kmeleon.general.searchEngine"
The quickest way to check this setting is to open about:config page and filter for "searchengine"




By the way, regardless of the about:home page, in KM there are several other ways to easily search stuff. For example:

click on the search button and input some text
Or select some text on a website and hit the search button
Or do the same and right-click the search button to use another engine
Or hit CTRL+G
Or use a separate searchbar, guess there's one in rodocops "Pro" build but not sure.

Anyway, most of us simply use the URLBAR as search bar. The engine for this method can be chosen at the bottom of F2 > Finding Websites. If enabled, instead of hitting the search button, you can simply type into the urlbar and hit the Return key. The only little catch is, by default this only works if there's a blank between at least 2 words, otherwise KM thinks you want to open a site. To fix this, set a bookmark for your prefered search and give it a "nick" name, free choice, for example a "g" like google. Then whenever you type "g xyz" into the urlbar and hit Return, KM searches for xyz using the g-bookmark. You can also define several nicks for several engines, e.g. w for wikipedia, then type "w xyz" etc.



Edited 3 time(s). Last edit at 11/28/2017 11:14AM by siria.

Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: monkeymoon
Date: November 28, 2017 04:49PM

thanks for this complete answer
i will see now if i'm able to do this !

Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: monkeymoon
Date: November 28, 2017 06:41PM

Ok i manage to do what i wanted
for those who are interrested:

- i made a copy of "omni.ja"
- i changed the extension of "omni.ja" to "omni.zip"
- i opened it in 7zip (but not extracted it, it's the important point, because it's very hard to repack all datas)
- i just get the file i needed outside 7zip (the "aboutHome.xhtml" for me)
- i opened the "aboutHome.xhtml" with Notepad++
- i search the word "searchengine"
- i inverted 2 lines like this:

<option value="Google">Google</option>
<option value="GoogleLucky">I'm feeling lucky!</option>

because i wanted "google" by default

- I simply saved with Notepad++
- i dragged the file into the 7zip opened window
- i saved the change in 7zip
- i closed 7zip
- i renamed the file to "omni.ja"
- i copied it in its original place "K-Meleon\browser\"
- and that's all

it would be possible to change other parameters using this way !!!


Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: JohnHell
Date: November 28, 2017 06:53PM

Oh, you didn't want to customize the page, just the search engine!!!!

I didn't understand.

You didn't need to modify omni.ja, only the preference kmeleon.general.searchEngineName which is controlled by the same options in the preferences panel for the url bar.

With the original omni.ja...

Open the preferences panel browsing > finding websites > url bar tab; and change the field of the search engine.

Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: siria
Date: November 28, 2017 06:55PM

Uhm, that's great, I'm impressed, but wouldn't a simple pref change been about 100x easier and quicker...?

Quote
siria
Its source code uses this pref: "kmeleon.general.searchEngine"
The quickest way to check this setting is to open about:config page and filter for "searchengine"


Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: siria
Date: November 28, 2017 11:34PM

Quote
monkeymoon
- i inverted 2 lines like this:
<option value="Google">Google</option>
<option value="GoogleLucky">I'm feeling lucky!</option>

No wonder... Took another look, and wondered where those lines are in the xhtml. Couldn't find them. Then looked into the omni.ja of the Pro version and - Bingo! The page is build completely different.

It would help in the future if you mention which KM version you're using.



Edited 1 time(s). Last edit at 11/28/2017 11:38PM by siria.

Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: monkeymoon
Date: November 29, 2017 08:37AM

ok ! sorry for that
it's true ! i use "K-Meleon 76 PRO"
i will remember the next time !



Edited 2 time(s). Last edit at 11/29/2017 08:40AM by monkeymoon.

Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: siria
Date: December 21, 2017 12:11AM

Quote
monkeymoon
Ok i manage to do what i wanted
for those who are interrested:

- i made a copy of "omni.ja"
- i changed the extension of "omni.ja" to "omni.zip"
- i opened it in 7zip (but not extracted it, it's the important point, because it's very hard to repack all datas)
- i just get the file i needed outside 7zip (the "aboutHome.xhtml" for me)
- i opened the "aboutHome.xhtml" with Notepad++
- i search the word "searchengine"
- i inverted 2 lines like this:

<option value="Google">Google</option>
<option value="GoogleLucky">I'm feeling lucky!</option>

because i wanted "google" by default

- I simply saved with Notepad++
- i dragged the file into the 7zip opened window
- i saved the change in 7zip
- i closed 7zip
- i renamed the file to "omni.ja"
- i copied it in its original place "K-Meleon\browser\"
- and that's all

The same, just simpler:
- make a backup copy of omni, just in case
- open the original omni.ja by doubleclicking => 7zip opens
- find the file inside, and doubleclick it => Notepad++ opens
- edit what you like
- Save and close editor
- 7zip now asks to save it inside the 7z-archive?
- Click OK or yes, whatever - DONE grinning smiley

Learned this just the last days, while trying omni.ja hacks for site-specific useragent switching, and it's really kinda easy!
PS:

Options: ReplyQuote
Re: configure the "about:home" page / search engine
Posted by: rodocop
Date: December 21, 2017 02:26AM

Most convenient way to edit that ja-, jar- and xpi-files is to use Total Commander (or its opensource clone Double Commander) with Total7zip plugin added.

Then it's almost as transparent as usual folder content management.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.