Permalink
Browse files

fixed erroneous brace in environment detection code. Fixed WSH test c…

…ase script
  • Loading branch information...
1 parent 1a7e4ef commit 3045bad1adbbfa25a27765d2278225fd043642a9 @dnewcome committed Aug 25, 2010
Showing with 14 additions and 21 deletions.
  1. +14 −15 jath.js
  2. +0 −6 wsh-test.js
View
29 jath.js
@@ -17,21 +17,20 @@ Jath.literalChar = ":";
* Also added support for WSH, uses the same API as IE
*/
var m_browser;
- if( typeof WScript != "undefined" ) {
- m_browser = 'msie';
- }
- else if( typeof node != "undefined" ) {
- // running under node.js
- m_browser = 'node';
- var xmljs = require( 'libxmljs' );
- exports.parse = parse;
- }
- else if( navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1 ) {
- m_browser = 'msie';
- }
- else {
- m_browser = 'standards';
- }
+if( typeof WScript != "undefined" ) {
+ m_browser = 'msie';
+}
+else if( typeof node != "undefined" ) {
+ // running under node.js
+ m_browser = 'node';
+ var xmljs = require( 'libxmljs' );
+ exports.parse = parse;
+}
+else if( navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1 ) {
+ m_browser = 'msie';
+}
+else {
+ m_browser = 'standards';
}
/**
View
@@ -1,9 +1,3 @@
-var ForReading = 1;
-var fso = new ActiveXObject("Scripting.FileSystemObject");
-var a = fso.OpenTextFile( filename, ForReading );
-var data = a.ReadAll();
-
-// var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
var xmlDoc = new ActiveXObject("MSXML2.DOMDocument.6.0");
xmlDoc.async = false;

0 comments on commit 3045bad

Please sign in to comment.