File tree 1 file changed +11
-4
lines changed
notebook/static/notebook/js
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -3175,6 +3175,7 @@ define([
3175
3175
* @param {Error } error
3176
3176
*/
3177
3177
Notebook . prototype . load_notebook_error = function ( error ) {
3178
+ var isSanitized = true ;
3178
3179
this . events . trigger ( 'notebook_load_failed.Notebook' , error ) ;
3179
3180
var msg ;
3180
3181
if ( error . name === utils . XHR_ERROR && error . xhr . status === 500 ) {
@@ -3187,6 +3188,11 @@ define([
3187
3188
console . warn ( 'Error stack trace while loading notebook was:' ) ;
3188
3189
console . warn ( error . stack ) ;
3189
3190
}
3191
+ if ( navigator . cookieEnabled == false ) {
3192
+ msg = i18n . msg . _ ( "Jupyter requires cookies to work; please enable cookies" +
3193
+ " and refresh page. <a href=\"https://www.wikihow.com/Enable-Cookies-in-Your-Internet-Web-Browser\"> Learn more about enabling cookies. </a>" ) ;
3194
+ isSanitized = false ;
3195
+ }
3190
3196
dialog . modal ( {
3191
3197
notebook : this ,
3192
3198
keyboard_manager : this . keyboard_manager ,
@@ -3198,9 +3204,10 @@ define([
3198
3204
click : function ( ) {
3199
3205
window . close ( ) ;
3200
3206
}
3201
- } ,
3202
- "Ok" : { }
3203
- }
3207
+ }
3208
+ } ,
3209
+ sanitize : isSanitized
3210
+
3204
3211
} ) ;
3205
3212
} ;
3206
3213
@@ -3378,4 +3385,4 @@ define([
3378
3385
} ;
3379
3386
3380
3387
return { Notebook : Notebook } ;
3381
- } ) ;
3388
+ } ) ;
You can’t perform that action at this time.
0 commit comments