mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Removing call to $.browser which went away in jQuery 1.9.
I have also cleaned up some calls to console.log.
This commit is contained in:
parent
b9193360a2
commit
8698f6af46
@ -202,7 +202,6 @@ var IPython = (function (IPython) {
|
||||
for (var k in CellToolbar._presets) {
|
||||
keys.push(k);
|
||||
}
|
||||
console.log(keys);
|
||||
return keys;
|
||||
};
|
||||
|
||||
|
@ -149,6 +149,6 @@
|
||||
example_preset.push('example.help')
|
||||
|
||||
CellToolbar.register_preset('Example',example_preset);
|
||||
console.log('Example extension for metadata editting loaded.');
|
||||
console.log('Example extension for metadata editing loaded.');
|
||||
|
||||
}(IPython));
|
||||
|
@ -79,7 +79,7 @@ var IPython = (function (IPython) {
|
||||
|
||||
this.element.resize(function () {
|
||||
// FIXME: Firefox on Linux misbehaves, so automatic scrolling is disabled
|
||||
if ( $.browser.mozilla ) {
|
||||
if ( IPython.utils.browser[0] === "Firefox" ) {
|
||||
return;
|
||||
}
|
||||
// maybe scroll output,
|
||||
|
@ -272,6 +272,15 @@ IPython.utils = (function (IPython) {
|
||||
return Math.floor(points*pixel_per_point);
|
||||
};
|
||||
|
||||
// http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
|
||||
browser = (function() {
|
||||
var N= navigator.appName, ua= navigator.userAgent, tem;
|
||||
var M= ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
|
||||
if (M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];
|
||||
M= M? [M[1], M[2]]: [N, navigator.appVersion,'-?'];
|
||||
return M;
|
||||
})();
|
||||
|
||||
|
||||
return {
|
||||
regex_split : regex_split,
|
||||
@ -282,7 +291,9 @@ IPython.utils = (function (IPython) {
|
||||
fixCarriageReturn : fixCarriageReturn,
|
||||
wrapUrls : wrapUrls,
|
||||
autoLinkUrls : autoLinkUrls,
|
||||
points_to_pixels : points_to_pixels
|
||||
points_to_pixels : points_to_pixels,
|
||||
browser : browser
|
||||
};
|
||||
|
||||
}(IPython));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user