PageSourceSearch

https://www.dubestemmer.no/Static/js/LanguageHelper.js

js dubestemmer.no collected 2026-10-01 11:40:29 UTC 918 bytes, 40 lines download raw bytes

1function siteLanguage(langcode) {
2    switch (langcode) {
3        case "en":
4            return "en";
5        case "nb-SJ":
6            return "nb-se";
7        case "nb-se":
8            return "nb-se";
9        case "nn":
10            return "nn";
11        case "no":
12            return "no";
13    }
14}
15
16function containsLanguage(text) {
17    var isEnglish = text.indexOf("/en/") > -1;
18    var isSami = text.indexOf("/nb-se/") > -1 || text.indexOf("/nb-SJ/") > -1;
19    var isBokmaal = text.indexOf("/no/") > -1;
20    var isNewNorwegian = text.indexOf("/nn/") > -1;
21    var urlDoesNotHaveSuffix = !isEnglish && !isSami && !isBokmaal && !isNewNorwegian;
22
23    if (urlDoesNotHaveSuffix) {
24        return false;
25    }
26    if (isEnglish) {
27        return "/en/";
28    }
29    if (isSami) {
30        return "/nb-se/"
31    }
32    if (isBokmaal) {
33        return "/no/"
34    }
35    if (isNewNorwegian) {
36        return "/nn/"
37    }
38
39    
40}

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.