Patches item #425954, was updated on 2001-05-21 08:59 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=305757&aid=425954&group_id=5757 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: extended OS and browser-detection Initial Comment: I neede a more detailed detection of os and browser (especially ie4.5 and ie5 on macOS due to massive performance troubles) so i added some detections to the [browser.js]-file. i adda a new class "os", so macOS-ie5 can be detected like this: if(os.mac&&is.ie5){ ...} henning /* DynAPI Distribution Browser Class The DynAPI Distribution is distributed under the terms of the GNU LGPL license. */ function Browser() { var b=navigator.appName; if (b=="Netscape") this.b="ns"; else if ((b=="Opera") || (navigator.userAgent.indexOf("Opera")>0)) this.b = "opera"; else if (b=="Microsoft Internet Explorer") this.b="ie"; if (!b) alert('Unidentified browser./nThis browser is not supported,'); this.version=navigator.appVersion; this.v=parseInt(this.version); this.ns=(this.b=="ns" && this.v>=4); this.ns4=(this.b=="ns" && this.v==4); this.ns6=(this.b=="ns" && this.v==5); this.ie=(this.b=="ie" && this.v>=4); this.ie4=(this.version.indexOf('MSIE 4')>0); this.ie5=(this.version.indexOf('MSIE 5')>0); this.ie55=(this.version.indexOf('MSIE 5.5')>0); this.opera=(this.b=="opera"); this.webtv=(this.b=="WebTV"); this.icab=(this.b=="iCab"); this.konqueror=(this.b=="Konqueror"); this.dom=(document.createElement && document.appendChild && document.getElementsByTagName)? true:false; this.def=(this.ie||this.dom); // most used browsers, for faster if loops var ua=navigator.userAgent.toLowerCase(); if (ua.indexOf("win")>-1) this.platform="win32"; else if (ua.indexOf("mac")>-1) this.platform="mac"; else this.platform="other"; } is = DynAPI.browser = new Browser(); function OperatingSystem() { this.win=(navigator.userAgent.toLowerCase ().indexOf("win")>-1); this.mac=(navigator.userAgent.toLowerCase ().indexOf("mac")>-1); this.linux=(navigator.userAgent.toLowerCase ().indexOf("Linux")>-1); this.x11=(navigator.userAgent.toLowerCase ().indexOf("x11")>-1); this.other=((!this.mac&&!this.win)&&(! this.linux||!this.x11)); } os = DynAPI.browser = new OperatingSystem(); ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=305757&aid=425954&group_id=5757 _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/dynapi-dev
