diff options
Diffstat (limited to 'template.go')
-rw-r--r-- | template.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/template.go b/template.go index 7c13451..c0a79a4 100644 --- a/template.go +++ b/template.go | |||
@@ -8,7 +8,19 @@ var tpltext = `<!doctype html> | |||
8 | </head> | 8 | </head> |
9 | <body> | 9 | <body> |
10 | <pre> | 10 | <pre> |
11 | {{range .Lines}} {{if .Link}}({{.Type}}) <a href="{{.Link}}">{{.Text}}</a>{{else}} {{.Text}}{{end}} | 11 | {{range .Lines}} {{if .Link}}({{.Type}}) <a class="{{ .Type }}" href="{{.Link}}">{{.Text}}</a>{{else}} {{.Text}}{{end}} |
12 | {{end}}</pre> | 12 | {{end}}</pre> |
13 | <script src="https://code.jquery.com/jquery-3.1.0.slim.min.js" integrity="sha256-cRpWjoSOw5KcyIOaZNo4i6fZ9tKPhYYb6i5T9RSVJG8=" crossorigin="anonymous"></script> | ||
14 | <script type="text/javascript"> | ||
15 | $(document).ready(function () { | ||
16 | $(".QRY").click(function (e) { | ||
17 | e.preventDefault(); | ||
18 | var query = prompt("Please enter required input: ", ""); | ||
19 | if (query != null) { | ||
20 | window.location = e.target.href + "%09" + query; | ||
21 | } | ||
22 | }); | ||
23 | }); | ||
24 | </script> | ||
13 | </body> | 25 | </body> |
14 | </html>` | 26 | </html>` |