[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: CSS ?
From:       Daniel Molkentin <molkentin () kde ! org>
Date:       2000-12-11 18:43:13
[Download RAW message or body]

On Monday 11 December 2000 21:31, Vadim Plessky wrote:

>
> --------------------------------------------------------------
> //Browser Detection
> // Valid values are ie3, ie4, ns3, and ns4
> var browser = "";
> var browsername = navigator.appName;
> var browserversion = parseInt(navigator.appVersion);
> var ua = navigator.userAgent;
> if (browsername == "Netscape") {
>     browser = "ns" + browserversion;
> } else {
>     if (browsername == "Microsoft Internet Explorer") {
>         if (browserversion >= 4) {
>             browser = "ie" + browserversion;
>         } else {
>             browser = "ie3";
>         }
>     }
> }
> if (browserversion < 4 ) {
> 	location.href="cantview.html";
> }
>
> if ((browsername == "Netscape") && (browserversion>=5))
> {
> 	location.href = "/video_vault";
> }
> --------------------------------------------------------------
>
> As you see, we just can't pass this, as they request navigator.appName and
> compare it only to Microsoft and Netscape.
> There is no entry for Konqueror (and Opera). I guess Opera will not pass
> through as well..
>
> I guess you should report this as a bug to CNN webmaster.
> Any ideas from Konqueror developers?

As of KDE 2.0, konqueror sets navigator.appName to "Netscape" or "Microsoft" 
Internet Explorer" if you apply a Netscape / IE userAgent String (for 
implementation details see kdelibs/khtml/ecma/kjs_navigator.cpp).
That applies all other navigator "indentifications". 

In KDE 2.1, even the plattform is set to either Win32 or X11 depending on the 
userAgent string.

If you have a situation where this will not work, please send me a minimal 
testcase. The example above _should_ work with userAgent set to "Netscape" 
(no time to test it though)

Regards,

</daniel>

-- 
KDE 2 - Conquer your Desktop!
http://www.kde.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic