yWeb: improve detection if IE up to IE11 and above

This commit is contained in:
GetAway
2015-05-01 22:15:14 +02:00
committed by svenhoefer
parent 30090ac06d
commit ce624d5382
5 changed files with 21 additions and 14 deletions

View File

@@ -3,8 +3,19 @@
$Revision$
*/
var baselib_version="2.0.0";
var agt=navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var tmp = document.documentMode, e, isIE;
// Try to force this property to be a string.
try{document.documentMode = "";}
catch(e){ };
// If document.documentMode is a number, then it is a read-only property, and so
// we have IE 8+.
// Otherwise, if conditional compilation works, then we have IE < 11.
// Otherwise, we have a non-IE browser.
isIE = typeof document.documentMode == "number" || new Function("return/*@cc_on!@*/!1")( );
// Switch back the value to be unobtrusive for non-IE browsers.
try{document.documentMode = tmp;}
catch(e){ };
/*DHTML-Basics*/
function $yN(_obj_name)
{

View File

@@ -79,9 +79,7 @@ function doUpload()
<script language="JavaScript" type="text/javascript" >
//<![CDATA[
var agt=navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
if(is_ie)
if(isIE)
document.f.appendx.checked = true;
window.document.f.cmd.focus();
//]]>

View File

@@ -109,8 +109,6 @@ function processReqChange()
}
else if (document.f.planer[1].checked == true)
{
var agt=navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var xml = g_req.responseXML;
var recProg_NodeList = xml.getElementsByTagName('item');
for(i=0;i<recProg_NodeList.length;i++)
@@ -119,7 +117,7 @@ function processReqChange()
var progName = getXMLNodeItemValue(recProg_Node, 'title');
var description = getXMLNodeItemValue(recProg_Node, 'description');
//FF3?Probs if(is_ie)
//FF3?Probs if(isIE)
{
var sDate = getXMLNodeItemValue(recProg_Node, 'dc:date');
var sender = getXMLNodeItemValue(recProg_Node, 'dc:subject');

View File

@@ -29,14 +29,14 @@ CyVLC.prototype = {
this.c_masterid = masterid;
this.c_width = width;
this.c_height = height;
if(!is_ie) {
if(!isIE) {
this.version_string = this._get_version();
this._generate_sub_versions();
this._determine_plugin_generation();
}
this.insert_control();
this.vlc = id(_id);
if(is_ie) {
if(isIE) {
this.version_string = this._get_version();
this._generate_sub_versions();
this._determine_plugin_generation();
@@ -44,7 +44,7 @@ CyVLC.prototype = {
this.set_resolution(this.c_width, this.c_height);
},
_get_version : function() {
if(is_ie)
if(isIE)
{
var vstr = this.vlc.VersionInfo;
var words = vstr.split(" ");
@@ -81,7 +81,7 @@ CyVLC.prototype = {
if(ve.length >4 && ve[4] !== "") this.version_level4 = ve[4];
},
_determine_plugin_generation : function() {
if(is_ie)
if(isIE)
this.plugin = "ie1";
else
if(this.version_level1 <= 0 && this.version_level2 <= 8 && this.version_level3 <= 5)
@@ -222,7 +222,7 @@ CyVLC.prototype = {
insert_control : function()
{
var vlc_control_html = "";
if(is_ie) {
if(isIE) {
vlc_control_html =
"<object classid=\"clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8\" " +
/* "<object classid=\"clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921\" " +*/

View File

@@ -1,4 +1,4 @@
version=2.9.0.21
version=2.9.0.22
date=01.05.2015
type=Release
info=Port CST