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 */
401401display : none;
402402}
403403
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+
404412
405413/* toggle */
406414# tracy-debug .tracy-toggle : after {
Original file line number Diff line number Diff line change @@ -55,6 +55,14 @@ pre.tracy-dump a:focus {
5555display : none;
5656}
5757
58+ .tracy-dump-highlight {
59+ background : # C22 ;
60+ color : white;
61+ border-radius : 2px ;
62+ padding : 0 2px ;
63+ margin : 0 -2px ;
64+ }
65+
5866span [data-tracy-href ] {
5967border-bottom : 1px dotted rgba (0 , 0 , 0 , .2 );
6068}
Original file line number Diff line number Diff line change 6666}
6767} ) ;
6868
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+
6988Tracy . Toggle . init ( ) ;
7089}
7190}
You can’t perform that action at this time.
0 commit comments