This repository was archived by the owner on Jun 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ const activate = (
47
47
// Instead we just have higher specificity and forget about the override; our theme will kick-in since it's all-in-one.
48
48
// We can rework this later after release once we split this into multiple extensions.
49
49
const body = document . querySelector ( 'body' ) ;
50
+
51
+ // Ensuring extension loads in an iframe within the AWS console context; otherwise do early return
52
+ if ( window . location === window . parent . location ) {
53
+ body . innerHTML = '' ;
54
+ return ;
55
+ }
56
+
50
57
body ?. setAttribute ( 'id' , 'glue-base' ) ;
51
58
body ?. classList . add ( 'aws-fake-loader' ) ;
52
59
@@ -81,7 +88,7 @@ const activate = (
81
88
*/
82
89
const addBtnText = 'Save the notebook contents and create checkpoint' ;
83
90
const addBtnSelector = `[title="${ addBtnText } "]` ;
84
- document . querySelector ( addBtnSelector ) . parentElement . remove ( ) ;
91
+ document . querySelector ( addBtnSelector ) ? .parentElement ? .remove ( ) ;
85
92
86
93
const buttonContainer = document . querySelector (
87
94
'.lm-Widget.p-Widget.jp-Toolbar-spacer.jp-Toolbar-item'
You can’t perform that action at this time.
0 commit comments