Extensions :  K-Meleon Forum
All about K-Meleon extensions. 
Useragent MultiSwitcher for KM 7x
Posted by: rodocop
Date: July 02, 2015 08:35PM

This is repacked and slightly tuned version of naruman's useragent switcher from his 74+1 build.

It is localized to russian and ready for 'others'-locales (template kml-file inside).

Just unpack into km-folder as usual.


UPD.!
File is updated with fixing issues caused by outdated default UA in naruman's switcher.
New default is Firefox 31 compatible.
Also K-meleon default UA added.

NB! If you need to update this addon:
1. Close KM
2. Unpack archive over old files
3. Delete startup-cache folder in your profile!
4. Run KM again


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 2 time(s). Last edit at 07/10/2015 09:38PM by rodocop.

Attachments: useragent.7z (5.2 KB)  
Options: ReplyQuote
Re: Useragent MultiSwitcher for KM 7x
Posted by: desga2
Date: July 03, 2015 08:12AM

Download not works sad smiley
"Error: Problem on server"


Greetings.

K-Meleon in Spanish



Edited 1 time(s). Last edit at 07/03/2015 08:13AM by desga2.

Options: ReplyQuote
Re: Useragent MultiSwitcher for KM 7x
Posted by: rodocop
Date: July 03, 2015 10:21AM

It works now for me.

SF had some problems this night, yes.

Try to redownload it now: I've made minor update, so the link is changed.


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 1 time(s). Last edit at 07/03/2015 10:26AM by rodocop.

Options: ReplyQuote
Re: Useragent MultiSwitcher for KM 7x
Posted by: rodocop
Date: July 10, 2015 09:39PM

Archive updated. See details in first post.


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)

Options: ReplyQuote
Re: Useragent MultiSwitcher for KM 7x
Posted by: siria
Date: July 10, 2015 10:24PM

IMO the default UA shouldn't be hardcoded at all. While I don't understand this sophisticated extension, I know from the traditional one that "default UA" simply means the OVERRIDE pref is empty => no overwriting of the native default. No idea if that would work here too, but perhaps just try. In the "kmeleonMain.js" (BTW why not useragentmulti.js or something? Why a general name that will override other same-name files, or be overwritten itself by others? And also why a same-name kmm-file to overwrite other UA macros or be overwritten by them? and in general why make it impossible to know by name which macro is which?)... oops but I digress, just loud thinking sorry. Meant to say:

in line 52 this line:
var KmOverrideString = 'Mozilla/5.0 (' + UsAgent.oscpu + '; ' + UsAgent.misc + ') Gecko/20100101 Firefox/31.0 K-Meleon/75.0' ;

perhaps try if still works if the 'default-override' var is empty?
var KmOverrideString = '' ;

Options: ReplyQuote
Re: Useragent MultiSwitcher for KM 7x
Posted by: rodocop
Date: July 10, 2015 11:37PM

I just tried to get naruman's work back to life.

I'm not enough qualified to change things other than some fixed strings sad smiley
I'm even not sure I can freely change the name of component without affecting this crazy ID - {FD1A56FA-0A19-424f-8C9D-FBBFF7CFEB07}.
What if Gecko gives that id taking the name as base somehow? I don't know.

I should try, I know...

About the kmm-name issue: old useragent.kmm is abandoned now in favor of useragentmode.kmm so I think this one could take its place without prob.

But we also can use nuseragent.kmm as it was named once.

Also I want to ask you some help:
I want to add an option to show current useragent, what was present in your useragent2.kmm (I think I can transfer it here by myself) but I also would be happy to see here the same info-windows for other settings - like the list of sites, associated with current specific UA (the killer feature of this addon for me - is the ability to set UA for particular sites).

Can I ask you to inspect my new code when it will be ready?


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)

Options: ReplyQuote
Re: Useragent MultiSwitcher for KM 7x
Posted by: siria
Date: July 11, 2015 12:32AM

The sites-list is just a pref, simple thing: "getpref" and "alert" to show it. With some replacement of ; with \n to get linebreaks between sites. If I recall correctly there's something with such linebreaks in oneventcheck.kmm too, perhaps an example.

Yes an automatic site-switcher is a great feature, but that doesn't mean the older macro were dead now, just because it's not in-the-box anymore! It works more basic and serves other needs (e.g. mine tongue sticking out smiley), and all UA-macros should simply co-exist. It would IMO be best to have them all begin with useragent... or UA_... to get them sorted together in the ever growing macros lists.
Have some dim memory that there was yet another... by adodupan...? Or do I confuse that now with Dorians mini-FF-UA? And was this one called autoswitcher in the past...? Am not keeping track, too complicated codes for me and can't test on 7X anyway.

PS: the default prefs list "useragent.js" shows names like "Firefox 31, 28, 25,..." but in reality they also send a variety of fake windows versions (NT 5.1, 6.1, 6.3, OpenBSD...) and OS languages (spanish, korean, ...) Would help to have those in the displayed name too.



Edited 1 time(s). Last edit at 07/11/2015 01:03AM by siria.

Options: ReplyQuote
Re: Useragent MultiSwitcher for KM 7x
Posted by: siria
Date: May 10, 2017 12:34AM

Is this the right thread for the UA switcher hardcoded in KM76-Pro...?

The site-specific function is interesting, but the killer prob is that no global fake UAs are possible anymore! It kills them all instantly. And this function cannot be disabled unless editing omni.ja
Wish it would at least be easier accessible in an open components folder.

Have now tried to make an improved version, but not tested yet. Probably created a few bugs and typos, no idea. Anyone feel like testing...?

The main intention was to allow BOTH, toggling global fake UAs, while still allowing individual site UAs.
- for global settings, the zip contains the good old UA macro from 2008 cool smiley
- for NOT killing those global settings, have messed inside that KmeleonMain.js file, just hope it works (sorry but still misleading name, no one will later realize it's part of a UA extension)
- to allow toggling of domains on/off, clicking on the current checkmark will remove the domain again from the stored sites
- and the menu offers the possibility to simple delete ALL stored sites completely, for quick-reset.

Anyone know if it would work to just disactivate parts of that js-script, in order to 'disable' it, or would such a half-working script cause problems?? Even, can it be removed completely or would that harm some native functions??



Edited 1 time(s). Last edit at 05/10/2017 12:36AM by siria.

Attachments: useragent_sites+global.7z (4 KB)  
Options: ReplyQuote


K-Meleon forum is powered by Phorum.