File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 22
22
</ div >
23
23
24
24
< link rel ="stylesheet " href ="https://cdn.jsdelivr.net/instantsearch.js/1/instantsearch.min.css ">
25
- <script src =" https://cdn.jsdelivr.net/instantsearch.js/1 /instantsearch.min.js " ></script >
25
+ < script src ="https://cdn.jsdelivr.net/npm/ instantsearch.js@1/dist /instantsearch.min.js "> </ script >
26
26
27
27
< script >
28
28
33
33
urlSync : true
34
34
} ) ;
35
35
36
+ function escapeHtml ( str ) {
37
+ var div = document . createElement ( 'div' ) ;
38
+ div . appendChild ( document . createTextNode ( str ) ) ;
39
+ return div . innerHTML ;
40
+ }
36
41
37
42
function app ( opts ) {
38
43
var switcher = document . getElementsByClassName ( 'version-switcher' ) [ 0 ] ;
91
96
92
97
return '<div class="hit"><h2 class="hit-name">' + link + '</h2><div class="hit-url">' + document . location . origin + url + '</div><div class="hit-content">' + item . _highlightResult . text . value + '</div></div>' ;
93
98
} ,
94
- empty : function ( query ) {
95
- return ' <div id="no-results-message"><p>No results for the search <em>"' + query .query + ' "</em>.</p></div>' ;
96
- },
99
+ empty : '<div id="no-results-message"><p>No results found.</p></div>' ,
100
+
97
101
} ,
98
102
} )
99
103
) ;
105
109
) ;
106
110
107
111
112
+
108
113
search . addWidget (
109
114
instantsearch . widgets . refinementList ( {
110
115
container : '#tags' ,
You can’t perform that action at this time.
0 commit comments