PageSourceSearch

https://www.jaktjournalen.se/view-resources/baseview/public/common/baseview/moduleHandlers.js?v=1789115892-L4

js jaktjournalen.se collected 2026-09-25 00:01:46 UTC 2,004 bytes, 65 lines download raw bytes

1/* eslint-disable no-new */
2
3/**
4 * Some element-types store data for use by JS-logic in 'window.dachserData'
5 * This module import dependencies, read data, create instances and pass the data to them.
6 */
7
8import * as modules from '../build/baseview_dependencie_modules.js?v=26';
9
10const handlers = {
11    labradorsearch: (item) => new modules.LabradorSearch(item),
12    tagboard: (item) => new modules.Tagboard(item),
13    frontcontent: (item) => new modules.FrontContent(item),
14    audioInline: (item) => new modules.AudioInline(item)
15};
16
17const labradorsearchQueue = window.dachserData.get('labradorsearch') || [];
18while (labradorsearchQueue.length) {
19    handlers.labradorsearch(labradorsearchQueue.shift());
20}
21
22const tagboardQueue = window.dachserData.get('tagboard') || [];
23while (tagboardQueue.length) {
24    handlers.tagboard(tagboardQueue.shift());
25}
26
27const frontcontentQueue = window.dachserData.get('frontcontent') || [];
28while (frontcontentQueue.length) {
29    handlers.frontcontent(frontcontentQueue.shift());
30}
31
32const audioInlineQueue = window.dachserData.get('audioInline') || [];
33while (audioInlineQueue.length) {
34    handlers.audioInline(audioInlineQueue.shift());
35}
36
37if (typeof modules.setupStickyFade === 'function') {
38    modules.setupStickyFade();
39}
40
41// Editor - redraws
42window.baseviewModulesReflow = (key, identifierKey, identifierValue) => {
43    const keyArray = window.dachserData.get(key);
44    if (!Array.isArray(keyArray)) {
45        return;
46    }
47    // Each redraw will add to the key. Use last.
48    const last = keyArray.filter((item) => item[identifierKey] === identifierValue).pop();
49    if (last && typeof handlers[key] === 'function') {
50        handlers[key](last);
51    }
52};
53
54// Redraws
55window.baseviewModulesReflowAll = (key) => {
56    const keyArray = window.dachserData.get(key);
57    if (!Array.isArray(keyArray)) {
58        return;
59    }
60    keyArray.forEach((item) => {
61        if (typeof handlers[key] === 'function') {
62            handlers[key](item);
63        }
64    });
65};

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.