Browse Source

Better comments for the search

master
David Larlet 2 years ago
parent
commit
8dbb3efdad
2 changed files with 4 additions and 6 deletions
  1. 2
    3
      david/recherche/index.html
  2. 2
    3
      david/templates/recherche.html

+ 2
- 3
david/recherche/index.html View File

@@ -2355,6 +2355,7 @@
}
]
</script>
<!-- French stopwords from https://github.com/stopwords-iso/stopwords-fr -->
<script id="search-stop-words" type="application/json">
[
"a", "abord", "absolument", "afin", "ah", "ai", "aie", "aient", "aies",
@@ -2459,11 +2460,9 @@
* https://gomakethings.com/how-to-update-the-url-of-a-page-without-causing-a-reload-using-vanilla-javascript/
*/
(function () {
// Retrieving the index from JSON.
// Retrieving the search index and stopwords from JSON.
// See https://v8.dev/blog/cost-of-javascript-2019#json
let searchIndex = JSON.parse(document.getElementById('search-index').textContent)

// French stopwords from https://github.com/stopwords-iso/stopwords-fr
let stopWords = JSON.parse(document.getElementById('search-stop-words').textContent)

// Get the DOM elements

+ 2
- 3
david/templates/recherche.html View File

@@ -48,6 +48,7 @@
<script id="search-index" type="application/json">
{{ search_index }}
</script>
<!-- French stopwords from https://github.com/stopwords-iso/stopwords-fr -->
<script id="search-stop-words" type="application/json">
[
"a", "abord", "absolument", "afin", "ah", "ai", "aie", "aient", "aies",
@@ -152,11 +153,9 @@
* https://gomakethings.com/how-to-update-the-url-of-a-page-without-causing-a-reload-using-vanilla-javascript/
*/
(function () {
// Retrieving the index from JSON.
// Retrieving the search index and stopwords from JSON.
// See https://v8.dev/blog/cost-of-javascript-2019#json
let searchIndex = JSON.parse(document.getElementById('search-index').textContent)

// French stopwords from https://github.com/stopwords-iso/stopwords-fr
let stopWords = JSON.parse(document.getElementById('search-stop-words').textContent)

// Get the DOM elements

Loading…
Cancel
Save