General :  K-Meleon Forum
General discussion about K-Meleon. 
how to change the old user agents
Posted by: chinarobin
Date: June 06, 2010 07:10PM



how to change the old user agents into new ones in hao's km ccf me?

as some of them are too old for most websites.

thanks!

Options: ReplyQuote
Re: how to change the old user agents
Posted by: siria
Date: June 06, 2010 09:21PM

No idea about CCF, but have you already tried one of the two ways for the 'normal' KM? Since it's only about toggling a text in the user prefs, I'm very optimistic it could work in 'special' KM versions too.
One of those two ways is the good old preferences trick:
Go to "about:config", type "agent", click to change...

Options: ReplyQuote
Re: how to change the old user agents
Posted by: JamesD
Date: June 06, 2010 09:42PM

Look in the file km\defaults\pref\I10n.js for a section named '// Privacy'. You can add user agents there. Each agent has two prefs - a name and a string. Make sure that there are no gaps in the numbers. If you already have prefs to the number 4 then when you add a new agent, you will have two prefs with the number 5

Options: ReplyQuote
Re: how to change the old user agents
Posted by: chinarobin
Date: June 07, 2010 12:18PM

Quote
siria
No idea about CCF, but have you already tried one of the two ways for the 'normal' KM? Since it's only about toggling a text in the user prefs, I'm very optimistic it could work in 'special' KM versions too.
One of those two ways is the good old preferences trick:
Go to "about:config", type "agent", click to change...


no about:config inccf.
thanks

Options: ReplyQuote
Re: how to change the old user agents
Posted by: chinarobin
Date: June 07, 2010 12:20PM

Quote
JamesD
Look in the file km\defaults\pref\I10n.js for a section named '// Privacy'. You can add user agents there. Each agent has two prefs - a name and a string. Make sure that there are no gaps in the numbers. If you already have prefs to the number 4 then when you add a new agent, you will have two prefs with the number 5

yes, i did as you said, and it works.
but the display of the user agent menu does not change.
any way, it's working

thanks James.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: 4td8s
Date: June 08, 2010 01:15AM

I though I had already mentioned how to do this in the KM 1.6 alpha thread:
http://kmeleon.sourceforge.net/forum/read.php?1,103184,page=4

Quote

eh, I've figured out how to do this myself. Edited "I10n.js" file from K-meleon1.6's
\defaults\pref\ folder and changed the following lines:

/********************************************************************************/
// Privacy

pref("kmeleon.privacy.useragent1.name", "Firefox 2.0");
pref("kmeleon.privacy.useragent1.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20");
pref("kmeleon.privacy.useragent2.name", "SeaMonkey 1.1");
pref("kmeleon.privacy.useragent2.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090825 SeaMonkey/1.1.18");
/********************************************************************************/

to this:

/********************************************************************************/
// Privacy

pref("kmeleon.privacy.useragent1.name", "Firefox 3.5");
pref("kmeleon.privacy.useragent1.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100203 Firefox/3.5.8");
pref("kmeleon.privacy.useragent2.name", "SeaMonkey 2.0");
pref("kmeleon.privacy.useragent2.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9pre) Gecko/20100205 SeaMonkey/2.0.3");


/********************************************************************************/

then reloaded KM 1.6.0a3 build 4 and now I can used the newly modified User Agent FF3.5/SM2.0 strings from the Tools, User Agent menu command. wee!

that was back when I edited the user agent strings of KM 1.6 alpha 3. for KM 1.6a4 and KM 1.7a, I'll have to come up with newer ones.

not sure if it applies to KM CCF ME versions but I guess it may also work with those.



Edited 2 time(s). Last edit at 06/08/2010 01:38AM by 4td8s.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: 4td8s
Date: June 08, 2010 01:20AM

Quote
chinarobin
yes, i did as you said, and it works.
but the display of the user agent menu does not change.
any way, it's working

I found the problem. Edit the menus.cfg file from the km\pref\ folder (NOT km\defaults\pref\ folder, where "km" is the KM CCF ME folder) and go to the "User Agent{" section. make the changes there and reload KM CCF ME.

Quote
chinarobin
how to change the old user agents into new ones in hao's km ccf me?

as some of them are too old for most websites.

what version of K-meleon CCF ME are you using, chinarobin?



Edited 5 time(s). Last edit at 06/08/2010 06:46AM by 4td8s.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: chinarobin
Date: June 08, 2010 11:21AM

to: 4td8s

i'm using kmccf me 0.095pre.

yes, i checked and changed the menus.cfg as you said, and the display is working now.

thank u. haha...


and here is a web for checking user agentshttp://whatsmyuseragent.com/



Edited 1 time(s). Last edit at 06/08/2010 11:22AM by chinarobin.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: 4td8s
Date: June 10, 2010 06:37AM

Quote
chinarobin

yes, i checked and changed the menus.cfg as you said, and the display is working now.

thank u. haha...

that's good. however, the kmeleon.js file needed to be edited from the \defaults\pref\ folder instead of the I10n.js file, which doesn't seem to exist with the KM CCF ME versions. kmeleon.js contains the useragent strings as well as that menus.cfg file.

The menus.cfg file from KM 1.6a4 and other non-CCF editions of KM, on the other hand, don't contain the user agent strings and thus didn't require making changes; it's only the I10n.js file that needed to be edited in those non-CCF versions of KM.



Edited 1 time(s). Last edit at 06/10/2010 06:39AM by 4td8s.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: chinarobin
Date: June 11, 2010 12:40PM

Quote
4td8s
Quote
chinarobin

yes, i checked and changed the menus.cfg as you said, and the display is working now.

thank u. haha...

that's good. however, the kmeleon.js file needed to be edited from the \defaults\pref\ folder instead of the I10n.js file, which doesn't seem to exist with the KM CCF ME versions. kmeleon.js contains the useragent strings as well as that menus.cfg file.

The menus.cfg file from KM 1.6a4 and other non-CCF editions of KM, on the other hand, don't contain the user agent strings and thus didn't require making changes; it's only the I10n.js file that needed to be edited in those non-CCF versions of KM.

yes, i found the english version donot have i10n.js originally, but i have change it into chinese with a zh local package, and there is a i10n.js file. so i can edit it.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: guenter
Date: June 12, 2010 06:04PM

K-MeleonCCFME0.096.5pre (en-US) has its user agent strings in ./defaults/pref/kmeleon.js.

The code is in section:

// Privacy

pref("kmeleon.privacy.useragent0.name", "K-Meleon");
pref("kmeleon.privacy.useragent0.string", "");
pref("kmeleon.privacy.useragent1.name", "MSIE 6.0");
pref("kmeleon.privacy.useragent1.string", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
pref("kmeleon.privacy.useragent2.name", "Netscape 4.8");
pref("kmeleon.privacy.useragent2.string", "Mozilla/4.8 [en] (Windows NT 5.1; U)");
pref("kmeleon.privacy.useragent3.name", "Opera 7.54");
pref("kmeleon.privacy.useragent3.string", "Opera/7.54 (Windows NT 5.1; U) [en]");
pref("kmeleon.privacy.useragent4.name", "Firefox/2.0.0.3");
pref("kmeleon.privacy.useragent4.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
pref("kmeleon.privacy.useragent5.name", "Iphone");
pref("kmeleon.privacy.useragent5.string", "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3");


You can edit the code there, if You want to change the defaults for future profiles.

If You have edited strings via menu already, the code is in prefs.js in used profile and it will overrule the strings changed in defaults.



Edited 1 time(s). Last edit at 06/12/2010 06:20PM by guenter.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: 4td8s
Date: June 15, 2010 08:13AM

Quote
guenter
K-MeleonCCFME0.096.5pre (en-US) has its user agent strings in ./defaults/pref/kmeleon.js.

The code is in section:

// Privacy

pref("kmeleon.privacy.useragent0.name", "K-Meleon");
pref("kmeleon.privacy.useragent0.string", "");
pref("kmeleon.privacy.useragent1.name", "MSIE 6.0");
pref("kmeleon.privacy.useragent1.string", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
pref("kmeleon.privacy.useragent2.name", "Netscape 4.8");
pref("kmeleon.privacy.useragent2.string", "Mozilla/4.8 [en] (Windows NT 5.1; U)");
pref("kmeleon.privacy.useragent3.name", "Opera 7.54");
pref("kmeleon.privacy.useragent3.string", "Opera/7.54 (Windows NT 5.1; U) [en]");
pref("kmeleon.privacy.useragent4.name", "Firefox/2.0.0.3");
pref("kmeleon.privacy.useragent4.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
pref("kmeleon.privacy.useragent5.name", "Iphone");
pref("kmeleon.privacy.useragent5.string", "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3");


You can edit the code there, if You want to change the defaults for future profiles.

If You have edited strings via menu already, the code is in prefs.js in used profile and it will overrule the strings changed in defaults.

the "iphone" and "Netscape 4.8" useragent strings should be dumped as they're of no use. get rid of them. the KM CCF ME user agent menu can only display and handle up to 5 user agent strings as I've found out myself.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: guenter
Date: June 15, 2010 10:09AM

Quote
4td8s

the "iphone" and "Netscape 4.8" useragent strings should be dumped as they're of no use. get rid of them. the KM CCF ME user agent menu can only display and handle up to 5 user agent strings as I've found out myself.


Netscape 4.8 is obsolete, obviously.
Perhaps useful when installing older Netscape plugins? I'd dump it, anyway.

IE speaks another JavaScript dialect. Very limited use. I'd dump it.

Firefox 2 should be replaced with a Firefox 3 string. I'd replace.
Reason: JavaScript dialect depends on the script engine used.

Opera 7.x? AFAIK best use more current a Opera for Linux string. I'd replace, update.
There are posts about what version string is useful for km 1.5.

Do not know about iphone. Probably dump, webkit has another JavaScript engine.



Edited 2 time(s). Last edit at 06/15/2010 10:13AM by guenter.

Options: ReplyQuote
Re: how to change the old user agents
Posted by: desga2
Date: June 17, 2010 03:53AM

Other more for the collection:
SRWare Iron 5.0.380 (Build for developers 45000)
WebKit 533.4
V8 2.2.2

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Iron/5.0.380.0 Chrome/5.0.380.0 Safari/533.4

K-Meleon in Spanish

Options: ReplyQuote


K-Meleon forum is powered by Phorum.