File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ document.addEventListener("DOMContentLoaded", function () {
11
11
var output = document . getElementById ( "output" ) ;
12
12
var htmlCheckbox = document . getElementById ( "html" ) ;
13
13
14
+ ( document . querySelectorAll ( '.notification .delete' ) || [ ] ) . forEach ( ( $delete ) => {
15
+ $notification = $delete . parentNode ;
16
+ $delete . addEventListener ( 'click' , ( ) => {
17
+ $notification . parentNode . removeChild ( $notification ) ;
18
+ } ) ;
19
+ } ) ;
20
+
14
21
function debounce ( func , wait , immediate ) {
15
22
var timeout ;
16
23
return function ( ) {
Original file line number Diff line number Diff line change 9
9
}
10
10
11
11
#output {
12
- {{.Background}}
13
-
12
+ {{.Background}};
14
13
overflow-x: scroll;
15
14
}
16
15
22
21
</head>
23
22
<body>
24
23
<div class="container">
25
- <div class="notification is-hidden"></div>
26
24
27
25
<h1 class="title">Chroma Playground</h1>
28
26
27
+ <div class="notification is-info">
28
+ <button class="delete"></button>
29
+ <a href="https://github.com/alecthomas/chroma">Chroma</a> is a general purpose syntax highlighter in pure Go.
30
+ It takes source code and other structured text and converts it into syntax highlighted HTML, ANSI-coloured text,
31
+ etc. Chroma is based heavily on Pygments, and includes translators for Pygments lexers and styles.
32
+ </div>
33
+
29
34
<form id="chroma" method="post">
30
35
{{ .CSRFField }}
31
36
<div class="columns">
You can’t perform that action at this time.
0 commit comments