File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
ReplayBrowser/Pages/Admin Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 47
47
}
48
48
49
49
var keys = MemoryCache .GetKeys ();
50
+ int i = 0 ;
50
51
foreach (var key in keys )
51
52
{
52
53
var entry = MemoryCache .Get (key );
56
57
<p >
57
58
Key : <span class =" text-muted" >@key </span ><br />
58
59
Value :
59
- <pre >< code class = " language- json" >@JsonSerializer.Serialize(entry , new JsonSerializerOptions () { WriteIndented = true } )</code ></pre ><br />
60
+ <pre id = " json-@i " >< code >@JsonSerializer.Serialize(entry , new JsonSerializerOptions () { WriteIndented = true } )</code ></pre ><br />
60
61
</p >
62
+ <button id =" highlight-btn-@i" class =" btn btn-primary" >Highlight JSON </button >
61
63
</div >
62
64
</div >
65
+
66
+ <script >
67
+ $ (" #highlight-btn-@i" ).click (function () {
68
+ // add the required class (language-json)
69
+ document .getElementById (" json-@i" ).classList .add (" language-json" );
70
+ Prism .highlightElement (document .getElementById (" json-@i" ));
71
+ });
72
+ </script >
73
+
74
+ i ++ ;
63
75
}
64
-
65
- <script >
66
- $ (document ).ready (function () {
67
- Prism .highlightAll ();
68
- });
69
- </script >
70
76
}
71
77
@code {
72
78
private bool _authed = false ;
You can’t perform that action at this time.
0 commit comments