General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
UserAgentSwitcher2
Posted by: Rapido
Date: June 24, 2009 06:19PM

Hi! I mange to convert this: http://chrispederick.com/work/user-agent-switcher/ 0.6 to work with k-meleon by using the convertion tool I found over at this page:
http://kmext.sourceforge.net/ however I need some help with this macro:

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- UserAgentSwitcher---------------------------------------------------------------------------------------------------------------



testerfester{
$OpenURL="chrome://useragentswitcher/content/useragentswitcher.xul";
$ExecMacros="OpenURL_InNewWindow"; &ExecMacros_Frames;
}

testerfester_BuildMenu{
setmenu("&Tools",macro,"UserAgent Extension",testerfester);
}

$OnInit=$OnInit."testerfester_BuildMenu;";
# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."testerfester;";

As you can see it doesn't look much to the eye so my wish is to have it built in to k-meleon. The reason I have is that I want more than 4r engines to choose between. This little tool can switch between several engines and you can add your own selections. So is there anyone outthere who can helpl?

Yours: Rapido

Options: ReplyQuote
Re: UserAgentSwitcher2
Posted by: disrupted
Date: June 24, 2009 09:29PM

we don't need that extension.. there's anexisting useragent macro, you can add more strings in prefs and they will show up in the menu.


to add your wanted strings..i already have few strings to test with websites including iphone mobile, you can use them as is.
open your profile folder
edit>configuration>profile directory
by the way do that when kmeleon is not running(in case of loader.exe close the loader as well)
inside profile directory, find prefs.js and open prefs.js in notepad or any text editor

now add those values at the end of prefs.js (we assume you have 2 already-firefox and seamonkey so we start with no.3)

user_pref("kmeleon.privacy.useragent3.name", "IE6/win|NT5");
user_pref("kmeleon.privacy.useragent3.string", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SPINWAY.COM; .NET CLR 1.1.4322; .NET CLR 2.0.50727)");
user_pref("kmeleon.privacy.useragent4.name", "IE7/win|NT6");
user_pref("kmeleon.privacy.useragent4.string", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)");
user_pref("kmeleon.privacy.useragent5.name", "KM/Knoppix");
user_pref("kmeleon.privacy.useragent5.string", "Mozilla/5.0 (X11; U; Knoppix 6.0.1-release i386; en-US; rv:1.8.1.18) Gecko/20081029 K-Meleon/1.5.1");
user_pref("kmeleon.privacy.useragent6.name", "IE5/MACOS9");
user_pref("kmeleon.privacy.useragent6.string", "Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC)");
user_pref("kmeleon.privacy.useragent7.name", "WK/MACOSX");
user_pref("kmeleon.privacy.useragent7.string", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1");
user_pref("kmeleon.privacy.useragent8.name", "WKM/iPhone");
user_pref("kmeleon.privacy.useragent8.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");


save prefs.js and open kmeleon..
now when you go to useragent menu, you will find 6 new entries:
IE6/win|NT5 = internet explorer 6 on windows xp
IE7/win|NT6 = internet explorer 7 on windows vista
KM/Knoppix = kmeleon on knoppix linux
IE5/MACOS9 = internet explorer 5 on mac os9
WK/MACOSX = safari webkit on mac os x
WKM/iPhone = safari webkit on mobile iphone

those are agents i use and they work all the time..if for example want to test a mobile only site, you use the iphone spoof..want to see how a site changes when using linux or internet explorer , use the other spoofs etc.

Options: ReplyQuote
Re: UserAgentSwitcher2
Posted by: Rapido
Date: June 24, 2009 10:31PM

Hi! And thanks for the help. This was just what I needed to see.

Yours: Rapido

Options: ReplyQuote


K-Meleon forum is powered by Phorum.