PageSourceSearch

https://sv-oberursel.de/svo.startpage.js

js sv-oberursel.de collected 2026-10-02 22:40:44 UTC 1,668 bytes, 75 lines download raw bytes

1/*
2 * svo.startpage.js
3 *
4 * Start page for SVO website
5 */
6
7svo.startpage = ( function () {
8  var
9    conf = {
10      txt :
11      '<div>' +
12        '<h1>News</h1>' +
13        '<div class="snippets">' +
14        '</div>' +
15      '</div>'
16    },
17    state = {
18      $container : null
19    },
20    jq_tags = {},
21    latest_news,
22    recent_news,
23    configure,
24    init
25  ;
26
27  latest_news = function () {
28    var $articles = jq_tags.$article_list;
29    svo.model.article.get_latest_news( function (txt) {
30      $articles.html( txt );
31    });
32  }
33
34  recent_news = function () {
35    let $snippets = jq_tags.$snippets;
36    console.log('Initial content of snippets area:\n' + $snippets.html());
37    svo.model.article.get_recent_news( function (snippets) {
38      snippets.forEach(function (snippet) {
39        $snippets.append(String() +
40          '<hr />' +
41          '<div class="snippet">' +
42            '<div class="snippet-pic">' +
43              '<img src="' + snippet.pic + '">' +
44            '</div>' +
45            '<div class="snippet-text">' +
46              '<h2>' + snippet.title + '</h2>' +
47              '<p>' + snippet.text + '</p>' +
48            '</div>' +
49          '</div>'
50        );
51      });
52    });
53  };
54
55  configure = function () {
56  };
57
58  init = function ( $container ) {
59    // Fill container with HTML
60    $container.html(conf.txt);
61    // Remeber current state and insertion points
62    state.$container = $container;
63    jq_tags = {
64      $container    : $container,
65      $snippets     : $container.find('.snippets')
66    };
67    // get links to five latest news
68    recent_news();
69  };
70
71  return {
72    configure : configure,
73    init      : init
74  };
75})();

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.