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

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


// Get the DOM elements // Get the DOM elements

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

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


// Get the DOM elements // Get the DOM elements

Loading…
Cancel
Save