PageSourceSearch

https://www.gamer.ru/public/microservices/newstracker/newstracker-template.js

js gamer.ru collected 2026-10-02 03:44:03 UTC 1,312 bytes, 30 lines download raw bytes

1import { topicHeader } from "../topic/topic-template.js"
2let { linker, escapeHtml, session, t } = typeof window !== 'undefined'
3  ? await import("../../shared/frontend.js")
4  : await import("../../shared/backend-server.js")
5
6
7
8
9export const newstrackerListItemHtml = (data, isAdmin) => {
10  const date = data.published ? new Date(data.published).toISOString() : ''
11  return `
12    <div class="news-item">
13      <div class="news-title" style='font-weight:bold; cursor:pointer; user-select:none;'>
14        ${escapeHtml(t(data.title))}
15        <span style='color:var(--color-gray)'> &mdash; <s-element-date date='${date}'></s-element-date></span>
16      </div>
17      <div class="news-body" style='display:grid; grid-template-rows:0fr; transition:grid-template-rows 0.3s ease'>
18        <div style='overflow:hidden'>
19          <div class="news-body-inner">
20            ${t(data.description) ? `<div class="news-description">${escapeHtml(t(data.description))}</div>` : ''}
21            <div class="news-url">
22              <a href="${escapeHtml(data.url)}" target="_blank" rel="noopener noreferrer nofollow">${escapeHtml(data.url)}</a>
23            </div>
24            ${isAdmin ? `<s-newstracker-newspopup newsid="${data._id}"></s-newstracker-newspopup>` : ''}
25          </div>
26        </div>
27      </div>
28    </div>
29  `
30}

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.