PageSourceSearch

https://www.dmp.no/js/spellcheck-suggestion.js

js dmp.no collected 2026-09-24 09:06:53 UTC 881 bytes, 29 lines download raw bytes

1function getSpellCheckAPI(query) {
2    const language = document.getElementsByTagName('html')[0].getAttribute('lang');
3    let timeoutId;
4    let tag = language == "en" ? "english" : "norwegian";
5    clearTimeout(timeoutId); // Cancel the previous timeout
6        var queryModel = {
7            query: query,
8            lang: language,
9            tag: tag
10        }
11        return getSpellCheckSuggestions(queryModel);
12}
13
14function getSpellCheckSuggestions(queryModel) {
15    return fetch('/search/getspellchecksuggestions/', {
16        method: "POST",
17        body: JSON.stringify(queryModel),
18        headers: {
19            "Content-Type": "application/json",
20        }
21    })
22    .then((response) => {
23        return response.json()
24    })
25    .then((data) => {
26        let spellCheckSuggestion = data;
27        return spellCheckSuggestion;
28    })
29}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.