##// END OF EJS Templates
allow utils.js to be loaded in node...
MinRK -
Show More
@@ -448,6 +448,10 b' IPython.utils = (function (IPython) {'
448
448
449 // http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
449 // http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
450 var browser = (function() {
450 var browser = (function() {
451 if (typeof navigator === 'undefined') {
452 // navigator undefined in node
453 return 'None';
454 }
451 var N= navigator.appName, ua= navigator.userAgent, tem;
455 var N= navigator.appName, ua= navigator.userAgent, tem;
452 var M= ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
456 var M= ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
453 if (M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];
457 if (M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];
General Comments 0
You need to be logged in to leave comments. Login now