PageSourceSearch

https://www.sb.by/local/templates/media_en/libs/magazine.min.js?17761565204752

js sb.by collected 2026-09-24 08:46:37 UTC 4,752 bytes, 146 lines download raw bytes

1function addPage(i, t, e, z, hh) {
2    var n = (t.turn("pages"), $("<div />", {}));
3    t.turn("addPage", n, i) && (n.html('<div class="gradient"></div><div class="loader"></div>'), loadPage(i, n, e, z, hh))
4}
5
6function loadPage(i, t, e, z, hh) {
7    var n = $("<img />");
8    n.mousedown(function(i) {
9        i.preventDefault()
10    }), n.load(function() {
11        $(this).css({
12            width: "100%",
13            height: "100%"
14        }), $(this).appendTo(t), t.find(".loader").remove()
15    });
16    var a = e,
17        h = e,
18        o = i;
19    (o = String(o).padStart(z, '0')), a += "page-" + o + ".png?" + hh, h += "large-" + o + ".png?" + hh, n.attr("data-big-url", h), n.attr("src", a), n.addClass("fancybox-toggler")
20}
21
22function zoomTo(i) {}
23
24function loadLargePage(i, t, e) {
25    var n = $("<img />");
26    n.load(function() {
27        var i = t.find("img");
28        $(this).css({
29            width: "100%",
30            height: "100%"
31        }), $(this).appendTo(t), i.remove()
32    });
33    var a = e;
34    a += "large-" + i + ".png", n.attr("src", a)
35}
36
37function loadSmallPage(i, t, e) {
38    var n = t.find("img");
39    n.css({
40        width: "100%",
41        height: "100%"
42    }), n.unbind("load");
43    var a = e;
44    a += "page-" + i + ".png?1", n.attr("src", a)
45}
46
47function isChrome() {
48    return -1 != navigator.userAgent.indexOf("Chrome")
49}
50
51function disableControls(i) {
52    1 == i ? $(".previous-button").hide() : $(".previous-button").show(), i == $(".magazine").turn("pages") ? $(".next-button").hide() : $(".next-button").show()
53}
54
55function resizeViewport() {
56    var i = $("#canvas").width(),
57        t = $(".magazine").turn("options"),
58        e = t.height;
59    if ($(".magazine").removeClass("animated"), $(".magazine-viewport").css({
60            width: i,
61            height: e
62        }), 1 == $(".magazine").turn("zoom")) {
63        var n = calculateBound({
64            width: t.width,
65            height: t.height,
66            boundWidth: Math.min(t.width, i),
67            boundHeight: Math.min(t.height, e)
68        });
69        n.width % 2 !== 0 && (n.width -= 1), (n.width != $(".magazine").width() || n.height != $(".magazine").height()) && ($(".magazine").turn("size", n.width, n.height), 1 == $(".magazine").turn("page") && $(".magazine").turn("peel", "br"), $(".next-button").css({
70            height: n.height,
71            backgroundPosition: "-38px " + (n.height / 2 - 16) + "px"
72        }), $(".previous-button").css({
73            height: n.height,
74            backgroundPosition: "-4px " + (n.height / 2 - 16) + "px"
75        }))
76    }
77    var a = $(".magazine").offset(),
78        h = e - a.top - $(".magazine").height(),
79        o = (h - $(".thumbnails > div").height()) / 2;
80    0 > o ? $(".thumbnails").css({
81        height: 1
82    }) : ($(".thumbnails").css({
83        height: h
84    }), $(".thumbnails > div").css({
85        marginTop: o
86    })), a.top < $(".made").height() ? $(".made").hide() : $(".made").show(), $(".magazine").addClass("animated")
87}
88
89function numberOfViews(i) {
90    return i.turn("pages") / 2 + 1
91}
92
93function getViewNumber(i, t) {
94    return parseInt((t || i.turn("page")) / 2 + 1, 10)
95}
96
97function moveBar(i) {
98    Modernizr && Modernizr.csstransforms && $("#slider .ui-slider-handle").css({
99        zIndex: i ? -1 : 1e4
100    })
101}
102
103function setPreview(i) {
104    var t = 112,
105        e = 73,
106        n = "pages/preview.jpg",
107        a = $(_thumbPreview.children(":first")),
108        h = 1 == i || i == $("#slider").slider("option", "max") ? 1 : 2,
109        o = 1 == h ? t / 2 : t;
110    _thumbPreview.addClass("no-transition").css({
111        width: o + 15,
112        height: e + 15,
113        top: -e - 30,
114        left: ($($("#slider").children(":first")).width() - o - 15) / 2
115    }), a.css({
116        width: o,
117        height: e
118    }), ("" === a.css("background-image") || "none" == a.css("background-image")) && (a.css({
119        backgroundImage: "url(" + n + ")"
120    }), setTimeout(function() {
121        _thumbPreview.removeClass("no-transition")
122    }, 0)), a.css({
123        backgroundPosition: "0px -" + (i - 1) * e + "px"
124    })
125}
126
127function largeMagazineWidth() {
128    return 2e3
129}
130
131function decodeParams(i) {
132    for (var t, e = i.split("&"), n = {}, a = 0; a < e.length; a++) t = e[a].split("="), n[decodeURIComponent(t[0])] = decodeURIComponent(t[1]);
133    return n
134}
135
136function calculateBound(i) {
137    var t = {
138        width: i.width,
139        height: i.height
140    };
141    if (t.width > i.boundWidth || t.height > i.boundHeight) {
142        var e = t.width / t.height;
143        i.boundWidth / e > i.boundHeight && i.boundHeight * e <= i.boundWidth ? (t.width = Math.round(i.boundHeight * e), t.height = i.boundHeight) : (t.width = i.boundWidth, t.height = Math.round(i.boundWidth / e))
144    }
145    return t
146}

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.