General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
New User Agent?
Posted by: Zvonko
Date: July 27, 2017 10:46AM

Quote
J.G.
... try adding this new UA to K-Meleon, it works well for me:
Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586

Where do I find and how do I install it?
Z.

Options: ReplyQuote
Re: New User Agent?
Posted by: J.G.
Date: July 27, 2017 11:20AM

http://kmeleonbrowser.org/forum/read.php?3,142035,142161#msg-142161

Please, read the content from above link. Then copy the new suggested UA text and add it to a new UA string. It works per session, so I always test it first at http://www.whoishostingthis.com/tools/user-agent/ or writing 'whats my user agent' in Chrome. It's very easy to add a new UA, but I still have not found how to delete or edit some of them (I have a lot including latest Firefox ones). smiling smiley

Options: ReplyQuote
Re: New User Agent?
Posted by: JohnHell
Date: July 27, 2017 03:33PM

Quote
J.G.
http://kmeleonbrowser.org/forum/read.php?3,142035,142161#msg-142161

Please, read the content from above link. Then copy the new suggested UA text and add it to a new UA string. It works per session, so I always test it first at http://www.whoishostingthis.com/tools/user-agent/ or writing 'whats my user agent' in Chrome. It's very easy to add a new UA, but I still have not found how to delete or edit some of them (I have a lot including latest Firefox ones). smiling smiley

J.G. and why not using the url "about:"? (without quotes).

Options: ReplyQuote
Re: New User Agent?
Posted by: Zvonko
Date: July 27, 2017 03:58PM

Quote
J.G.
http://kmeleonbrowser.org/forum/read.php?3,142035,142161#msg-142161

Please, read the content from above link. ...

Hm ... there is no information on the procedure. But I found a macro which allows to insert a custom user agent string here:
UserAgentMacro

Thank you very much, J.G.! Unfortunately the new UA doesn't help for my problem Not working ...

Options: ReplyQuote
Re: New User Agent?
Posted by: Zvonko
Date: July 27, 2017 07:08PM

Quote
J.G.
... but I still have not found how to delete or edit some of them (I have a lot including latest Firefox ones). smiling smiley

I think you can delete added UAs in the prefs.js (in your profile folder). You will found them in lines containing 'privacy.useragent'. (Edit prefs.js when KM is not running.)

Options: ReplyQuote
Re: New User Agent?
Posted by: J.G.
Date: July 27, 2017 08:55PM

@Zvonko, thank you for the advice!
Perhaps you can try the UA from the other browser that works for you.:s

Options: ReplyQuote
Re: New User Agent?
Posted by: J.G.
Date: August 17, 2017 05:58PM

Quote
Zvonko
Quote
J.G.
... but I still have not found how to delete or edit some of them (I have a lot including latest Firefox ones). smiling smiley

I think you can delete added UAs in the prefs.js (in your profile folder). You will found them in lines containing 'privacy.useragent'. (Edit prefs.js when KM is not running.)

I have finally found how to delete them:
about:config
Set blank the desired one at lines: kmeleon.privacy.useragent1.string;
(It's an example only, the string may vary in a number).
smiling smiley

Options: ReplyQuote
Re: New User Agent?
Posted by: guenter
Date: August 18, 2017 06:44AM

Quote
Zvonko
Quote
J.G.
... but I still have not found how to delete or edit some of them (I have a lot including latest Firefox ones). smiling smiley

I think you can delete added UAs in the prefs.js (in your profile folder). You will found them in lines containing 'privacy.useragent'. (Edit prefs.js when KM is not running.)

Yes You can do it that way.

But You can do it by the old macro and prevent the writing at the first place,

Then You do not have to edit.


And if I remember correctly installing the macro and its pre-requisits properly should overwrite values in the profile's prefs.js automatically.

Throw a file with extension .js to the install location of your km. For me.

e:/K-Meleon76Beta/browser/defaults/preferences/

Exact location can vary by version. It contains kmeleon.js and so on.


My file is called: UserAgents.js

"//" means commented out

I used some custom UA strings that were good at the time when I last updated the strings. Please update. You can add more that three custom UA by following the pattern. Next would be "useragent3.name",


Start of code inside UserAgents.js
/********************************************************************************************************/
// Privacy Mozilla/5.0 (Windows NT 5.1; rv:24.3) Gecko/20140105 Firefox/24.0 K-Meleon/74.0
// pref("general.useragent.override", "Mozilla/5.0 (Windows NT 5.1; rv:24.3) Gecko/20140105 Firefox/38 K-Meleon/76.0");

pref("kmeleon.privacy.useragent0.name", "Firefox 38 ESR");
pref("kmeleon.privacy.useragent0.string", "Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Firefox/38.0 K-Meleon/76");
pref("kmeleon.privacy.useragent1.name", "Nightly 51");
pref("kmeleon.privacy.useragent1.string", "Build identifier: Mozilla/5.0 (Windows NT 5.1; rv:51.0) Gecko/20100101 Firefox/51.0");
pref("kmeleon.privacy.useragent2.name", "SeaMonkey 2.39");
pref("kmeleon.privacy.useragent2.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:43.0.1) Gecko/20100101 SeaMonkey/2.39");



Edited 1 time(s). Last edit at 08/18/2017 06:45AM by guenter.

Options: ReplyQuote
Re: New User Agent?
Posted by: callahan
Date: August 22, 2017 06:30PM

Thanks guenter and JohnHell for more details ... guenter, I used your example and finally figured everything out. At this time, I only want four user agents but couldn't get rid of the 5 thru 8 blanks.

After I edited everything to my liking ... the blank numbers 5-8 were still showing in 'about:config' ... until I finally figured out that I had to reset everything from 'user set' to 'default'.

That also fixed the 'general.useragent.override' ... for the new one to show.

Now everything looks good.
...

Options: ReplyQuote
Re: New User Agent?
Posted by: siria
Date: August 22, 2017 09:42PM

Quote

And if I remember correctly installing the macro and its pre-requisits properly should overwrite values in the profile's prefs.js automatically.

Not really, it has always been the opposite way:
the installation folder defines the default values, but the user settings in his current profile folder have priority (most are stored in prefs.js)

Just as a bit basics info for interested people:
Prefs.js in the current profile folder stores only non-default settings of a user (with a few exotic exceptions)
Customized user settings from prefs.js are highlighted in about:config
So, if the user switches a pref back to default, his previous custom settings are now obsolete and deleted again in his prefs.js file. That means, in about:config appears again the default value, without highlighting.

Quote
callahan
After I edited everything to my liking ... the blank numbers 5-8 were still showing in 'about:config' ... until I finally figured out that I had to reset everything from 'user set' to 'default'.

Yes that's the most frequent and ususally quickest method, for toggling a pref in about:config
Another with the same effect, sometimes quicker to toggle many prefs at once, would be to close the browser, open the current profile folder prefs.js in a notepad, and delete (=reset) those lines in it, then restart the browser.

Not saying one method were better as the other, just trying to show more possibilities.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.