Skip to content

Commit c36d248

Browse files
committed
custom.js: clean up after removedPattern removal.
1 parent 643557b commit c36d248

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

docs/js/custom.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,6 @@ $(document).ready(function() {
120120
indexName: 'ezplatform',
121121
inputSelector: '#search_input',
122122
transformData: function(hits) {
123-
$.each(hits, function(index, hit) {
124-
for (let lvl = 2; lvl <= 6; lvl++) {
125-
if (null !== hit.hierarchy['lvl' + lvl]) {
126-
hits[index].hierarchy['lvl' + lvl] = hit.hierarchy['lvl' + lvl];
127-
}
128-
if ('undefined' !== typeof hit._highlightResult.hierarchy['lvl' + lvl]) {
129-
hits[index]._highlightResult.hierarchy['lvl' + lvl].value = hit._highlightResult.hierarchy['lvl' + lvl].value;
130-
}
131-
}
132-
});
133-
134123
let link = $('.ds-dropdown-menu a.search-page-link');
135124
if (!link.length) {
136125
$('.ds-dropdown-menu').append(`<div class="search-page-link-wrapper">
@@ -152,15 +141,15 @@ $(document).ready(function() {
152141
window.location = $('.ds-dropdown-menu a.search-page-link').attr('href');
153142
}
154143
},
155-
debug: false,
144+
debug: true,
156145
});
157146
search.autocomplete.on('autocomplete:updated', event => {
158147
$('.ds-dropdown-menu .ds-suggestion').each(function() {
159148
let category = $(this).find('.algolia-docsearch-suggestion--subcategory-column');
160149
let content = $(this).find('.algolia-docsearch-suggestion--title');
161-
if (content.text().trim() == category.text().trim()) {
162-
content.remove();
163-
}
150+
//if (content.text().trim() == category.text().trim()) {
151+
// content.remove();
152+
//}
164153
});
165154
});
166155

0 commit comments

Comments
 (0)