File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,14 @@ body#tracy-debug .tracy-panel { /* in popup window */
401
401
display : none;
402
402
}
403
403
404
+ # tracy-debug .tracy-dump-highlight {
405
+ background : # C22 ;
406
+ color : white;
407
+ border-radius : 2px ;
408
+ padding : 0 2px ;
409
+ margin : 0 -2px ;
410
+ }
411
+
404
412
405
413
/* toggle */
406
414
# tracy-debug .tracy-toggle : after {
Original file line number Diff line number Diff line change @@ -55,6 +55,14 @@ pre.tracy-dump a:focus {
55
55
display : none;
56
56
}
57
57
58
+ .tracy-dump-highlight {
59
+ background : # C22 ;
60
+ color : white;
61
+ border-radius : 2px ;
62
+ padding : 0 2px ;
63
+ margin : 0 -2px ;
64
+ }
65
+
58
66
span [data-tracy-href ] {
59
67
border-bottom : 1px dotted rgba (0 , 0 , 0 , .2 );
60
68
}
Original file line number Diff line number Diff line change 66
66
}
67
67
} ) ;
68
68
69
+ document . addEventListener ( 'mouseover' , ( e ) => {
70
+ let dump ;
71
+ if ( e . target . matches ( '.tracy-dump-hash' ) && ( dump = e . target . closest ( '.tracy-dump' ) ) ) {
72
+ dump . querySelectorAll ( '.tracy-dump-hash' ) . forEach ( ( el ) => {
73
+ if ( el . textContent === e . target . textContent ) {
74
+ el . classList . add ( 'tracy-dump-highlight' ) ;
75
+ }
76
+ } ) ;
77
+ }
78
+ } ) ;
79
+
80
+ document . addEventListener ( 'mouseout' , ( e ) => {
81
+ if ( e . target . matches ( '.tracy-dump-hash' ) ) {
82
+ document . querySelectorAll ( '.tracy-dump-hash.tracy-dump-highlight' ) . forEach ( ( el ) => {
83
+ el . classList . remove ( 'tracy-dump-highlight' ) ;
84
+ } ) ;
85
+ }
86
+ } ) ;
87
+
69
88
Tracy . Toggle . init ( ) ;
70
89
}
71
90
}
You can’t perform that action at this time.
0 commit comments