diff --git a/src/nhttpd/web/Y_Baselib.js b/src/nhttpd/web/Y_Baselib.js index a9c208648..fa4754711 100644 --- a/src/nhttpd/web/Y_Baselib.js +++ b/src/nhttpd/web/Y_Baselib.js @@ -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) { diff --git a/src/nhttpd/web/Y_Tools_Cmd.yhtm b/src/nhttpd/web/Y_Tools_Cmd.yhtm index 5181c4303..5eea1491b 100644 --- a/src/nhttpd/web/Y_Tools_Cmd.yhtm +++ b/src/nhttpd/web/Y_Tools_Cmd.yhtm @@ -79,9 +79,7 @@ function doUpload()