File tree Expand file tree Collapse file tree 5 files changed +18
-21
lines changed
Expand file tree Collapse file tree 5 files changed +18
-21
lines changed Original file line number Diff line number Diff line change 11ScratchTools . console = { } ;
2- ScratchTools . console . log = function ( text ) {
2+
3+ ScratchTools . console . styleLog = function ( text , backgroundColor ) {
34 var styleArray = [
45 "padding: 0.1rem" ,
5- "background-color: lime" ,
6+ "background-color: " + backgroundColor ,
67 "border-radius: 0.2rem" ,
78 "color: black" ,
89 ] ;
910 console . log ( "%cScratchTools" , styleArray . join ( ";" ) , text ) ;
1011} ;
12+
13+ ScratchTools . console . log = function ( text ) {
14+ ScratchTools . console . styleLog ( text , "lime" ) ;
15+ } ;
16+
1117ScratchTools . console . warn = function ( text ) {
12- var styleArray = [
13- "padding: 0.1rem" ,
14- "background-color: yellow" ,
15- "border-radius: 0.2rem" ,
16- "color: black" ,
17- ] ;
18- console . log ( "%cScratchTools" , styleArray . join ( ";" ) , text ) ;
18+ ScratchTools . console . styleLog ( text , "yellow" ) ;
1919} ;
20+
2021ScratchTools . console . error = function ( text ) {
21- var styleArray = [
22- "padding: 0.1rem" ,
23- "background-color: #ff9f00" ,
24- "border-radius: 0.2rem" ,
25- "color: black" ,
26- ] ;
27- console . log ( "%cScratchTools" , styleArray . join ( ";" ) , text ) ;
22+ ScratchTools . console . styleLog ( text , "#ff9f00" ) ;
2823} ;
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ ScratchTools.managedElements = [];
7373ScratchTools . Storage = { } ;
7474ScratchTools . Resources = { } ;
7575ste . console . log ( "ScratchTools API Created" , "ste-main" ) ;
76+
7677if (
7778 window . location . href . startsWith ( "https://scratch.mit.edu/projects/" ) &&
7879 window . location . href . includes ( "/editor" )
@@ -154,6 +155,7 @@ function enableScratchToolsSelectorsMutationObserver() {
154155 { attributes : true , childList : true , subtree : true }
155156 ) ;
156157}
158+
157159enableScratchToolsSelectorsMutationObserver ( ) ;
158160
159161function returnScratchToolsSelectorsMutationObserverCallbacks ( ) {
Original file line number Diff line number Diff line change 77 position : fixed;
88 left : 0px ;
99 top : 0px ;
10- z-index : 999999999999999 ;
10+ z-index : 2147483646 ;
1111}
1212
1313.st-modal {
1919 background-color : # fafafa ;
2020 border-radius : 0.5rem ;
2121 padding-top : 3rem ;
22- z-index : 999999999999999999999 ;
22+ z-index : 2147483647 ;
2323}
2424
2525.st-modal h1 {
Original file line number Diff line number Diff line change 77 position : fixed;
88 left : 0px ;
99 top : 0px ;
10- z-index : 999999999999999 ;
10+ z-index : 2147483646 ;
1111}
1212
1313.st-modal {
1919 background-color : var (--background );
2020 border-radius : 0.5rem ;
2121 padding-top : 3rem ;
22- z-index : 999999999999999999999 ;
22+ z-index : 2147483647 ;
2323}
2424
2525.st-modal h1 {
Original file line number Diff line number Diff line change 33 position : fixed;
44 right : 3rem ;
55 top : 5rem ;
6- z-index : 9999999999999 ;
6+ z-index : 2147483644 ;
77 width : 40rem ;
88 padding : 1rem ;
99 border-radius : .5rem ;
You can’t perform that action at this time.
0 commit comments