PageSourceSearch

https://thndr.app/blogpost/wp-content/themes/neeon/assets/js/jquery.ticker.js?ver=1.0

js thndr.app collected 2026-10-03 19:46:39 UTC 11,739 bytes, 169 lines download raw bytes

1! function(e) {
2    e.fn.ticker = function(t) {
3        var o = e.extend({}, e.fn.ticker.defaults, t);
4        if (0 == e(this).length) return window.console && window.console.log ? window.console.log("Element does not exist in DOM!") : alert("Element does not exist in DOM!"), !1;
5        var n = "#" + e(this).attr("id"),
6            i = e(this).get(0).tagName;
7        return this.each(function() {
8            function t(e) {
9                var t, o = 0;
10                for (t in e) e.hasOwnProperty(t) && o++;
11                return o
12            }
13
14            function d() {
15                var e = new Date;
16                return e.getTime()
17            }
18
19            function l(e) {
20                o.debugMode && (window.console && window.console.log ? window.console.log(e) : alert(e))
21            }
22
23            function a() {
24                s(), e(n).wrap('<div id="' + f.dom.wrapperID.replace("#", "") + '"></div>'), e(f.dom.wrapperID).children().remove(), e(f.dom.wrapperID).append('<div id="' + f.dom.tickerID.replace("#", "") + '" class="ticker"><div id="' + f.dom.titleID.replace("#", "") + '" class="ticker-title"><span><!-- --></span></div><p id="' + f.dom.contentID.replace("#", "") + '" class="ticker-content"></p><div id="' + f.dom.revealID.replace("#", "") + '" class="ticker-swipe"><span><!-- --></span></div></div>'), e(f.dom.wrapperID).removeClass("no-js").addClass("ticker-wrapper has-js " + o.direction), e(f.dom.tickerElem + "," + f.dom.contentID).hide(), o.controls && (e(f.dom.controlsID).on("click mouseover mousedown mouseout mouseup", function(t) {
25                    var o = t.target.id;
26                    if ("click" == t.type) switch (o) {
27                        case f.dom.prevID.replace("#", ""):
28                            f.paused = !0, e(f.dom.playPauseID).addClass("paused"), h("prev");
29                            break;
30                        case f.dom.nextID.replace("#", ""):
31                            f.paused = !0, e(f.dom.playPauseID).addClass("paused"), h("next");
32                            break;
33                        case f.dom.playPauseID.replace("#", ""):
34                            1 == f.play ? (f.paused = !0, e(f.dom.playPauseID).addClass("paused"), p()) : (f.paused = !1, e(f.dom.playPauseID).removeClass("paused"), u())
35                    } else "mouseover" == t.type && e("#" + o).hasClass("controls") ? e("#" + o).addClass("over") : "mousedown" == t.type && e("#" + o).hasClass("controls") ? e("#" + o).addClass("down") : "mouseup" == t.type && e("#" + o).hasClass("controls") ? e("#" + o).removeClass("down") : "mouseout" == t.type && e("#" + o).hasClass("controls") && e("#" + o).removeClass("over")
36                }), e(f.dom.wrapperID).append('<ul id="' + f.dom.controlsID.replace("#", "") + '" class="ticker-controls"><li id="' + f.dom.playPauseID.replace("#", "") + '" class="jnt-play-pause controls"><a href=""><!-- --></a></li><li id="' + f.dom.prevID.replace("#", "") + '" class="jnt-prev controls"><a href=""><!-- --></a></li><li id="' + f.dom.nextID.replace("#", "") + '" class="jnt-next controls"><a href=""><!-- --></a></li></ul>')), "fade" != o.displayType && e(f.dom.contentID).mouseover(function() {
37                    0 == f.paused && p()
38                }).mouseout(function() {
39                    0 == f.paused && u()
40                }), o.ajaxFeed || r()
41            }
42
43            function s() {
44                if (0 == f.contentLoaded)
45                    if (o.ajaxFeed) "xml" == o.feedType ? e.ajax({
46                        url: o.feedUrl,
47                        cache: !1,
48                        dataType: o.feedType,
49                        async: !0,
50                        success: function(e) {
51                            count = 0;
52                            for (var n = 0; n < e.childNodes.length; n++) "rss" == e.childNodes[n].nodeName && (xmlContent = e.childNodes[n]);
53                            for (var i = 0; i < xmlContent.childNodes.length; i++) "channel" == xmlContent.childNodes[i].nodeName && (xmlChannel = xmlContent.childNodes[i]);
54                            for (var d = 0; d < xmlChannel.childNodes.length; d++)
55                                if ("item" == xmlChannel.childNodes[d].nodeName) {
56                                    xmlItems = xmlChannel.childNodes[d];
57                                    for (var a, s = !1, c = 0; c < xmlItems.childNodes.length; c++) "title" == xmlItems.childNodes[c].nodeName ? a = xmlItems.childNodes[c].lastChild.nodeValue : "link" == xmlItems.childNodes[c].nodeName && (s = xmlItems.childNodes[c].lastChild.nodeValue), a !== !1 && "" != a && s !== !1 && (f.newsArr["item-" + count] = {
58                                        type: o.titleText,
59                                        content: '<a href="' + s + '">' + a + "</a>"
60                                    }, count++, a = !1, s = !1)
61                                } return t(f.newsArr) < 1 ? (l("Couldn't find any content from the XML feed for the ticker to use!"), !1) : (f.contentLoaded = !0, void r())
62                        }
63                    }) : l("Code Me!");
64                    else {
65                        if (!o.htmlFeed) return l("The ticker is set to not use any types of content! Check the settings for the ticker."), !1;
66                        if (!(e(n + " LI").length > 0)) return l("Couldn't find HTML any content for the ticker to use!"), !1;
67                        e(n + " LI").each(function(t) {
68                            f.newsArr["item-" + t] = {
69                                type: o.titleText,
70                                content: e(this).html()
71                            }
72                        })
73                    }
74            }
75
76            function r() {
77                f.contentLoaded = !0, e(f.dom.titleElem).html(f.newsArr["item-" + f.position].type), e(f.dom.contentID).html(f.newsArr["item-" + f.position].content), f.position == t(f.newsArr) - 1 ? f.position = 0 : f.position++, distance = e(f.dom.contentID).width(), time = distance / o.speed, c()
78            }
79
80            function c() {
81                if (e(f.dom.contentID).css("opacity", "1"), !f.play) return !1;
82                var t = e(f.dom.titleID).width() + 20;
83                e(f.dom.revealID).css(o.direction, t + "px"), "fade" == o.displayType ? e(f.dom.revealID).hide(0, function() {
84                    e(f.dom.contentID).css(o.direction, t + "px").fadeIn(o.fadeInSpeed, m)
85                }) : "scroll" == o.displayType || e(f.dom.revealElem).show(0, function() {
86                    e(f.dom.contentID).css(o.direction, t + "px").show(), contentWindowSize = e(f.dom.tickerID).width() - e(f.dom.titleID).width() - 20, e(f.dom.contentID).width() <= contentWindowSize ? (animationAction = "right" == o.direction ? {
87                        marginRight: distance + "px"
88                    } : {
89                        marginLeft: distance + "px"
90                    }, e(f.dom.revealID).css("margin-" + o.direction, "0px").delay(20).animate(animationAction, time, "linear", m)) : (delay_scroll = contentWindowSize / o.speed, time_scroll = e(f.dom.contentID).width() / o.speed - delay_scroll, animationAction = "right" == o.direction ? {
91                        marginRight: contentWindowSize - 7 + "px"
92                    } : {
93                        marginLeft: contentWindowSize - 7 + "px"
94                    }, e(f.dom.revealID).css("margin-" + o.direction, "0px").delay(20).animate(animationAction, delay_scroll, "linear"), scrollSize = e(f.dom.titleID).width() + 20 - e(f.dom.contentID).width() + contentWindowSize, animationAction_scroll = "right" == o.direction ? {
95                        right: scrollSize + "px"
96                    } : {
97                        left: scrollSize + "px"
98                    }, e(f.dom.contentID).delay(delay_scroll).animate(animationAction_scroll, time_scroll, "linear", m))
99                })
100            }
101
102            function m() {
103                f.play ? (e(f.dom.contentID).delay(o.pauseOnItems).fadeOut(o.fadeOutSpeed), "fade" == o.displayType ? e(f.dom.contentID).fadeOut(o.fadeOutSpeed, function() {
104                    e(f.dom.wrapperID).find(f.dom.revealElem + "," + f.dom.contentID).hide().end().find(f.dom.tickerID + "," + f.dom.revealID).show().end().find(f.dom.tickerID + "," + f.dom.revealID).removeAttr("style"), r()
105                }) : e(f.dom.revealID).hide(0, function() {
106                    e(f.dom.contentID).fadeOut(o.fadeOutSpeed, function() {
107                        e(f.dom.wrapperID).find(f.dom.revealElem + "," + f.dom.contentID).hide().end().find(f.dom.tickerID + "," + f.dom.revealID).show().end().find(f.dom.tickerID + "," + f.dom.revealID).removeAttr("style"), r()
108                    })
109                })) : e(f.dom.revealElem).hide()
110            }
111
112            function p() {
113                f.play = !1, e(f.dom.tickerID + "," + f.dom.revealID + "," + f.dom.titleID + "," + f.dom.titleElem + "," + f.dom.revealElem + "," + f.dom.contentID).stop(!0, !0), e(f.dom.revealID + "," + f.dom.revealElem).hide(), e(f.dom.wrapperID).find(f.dom.titleID + "," + f.dom.titleElem).show().end().find(f.dom.contentID).show()
114            }
115
116            function u() {
117                f.play = !0, f.paused = !1, m()
118            }
119
120            function h(o) {
121                switch (p(), o) {
122                    case "prev":
123                        0 == f.position ? f.position = t(f.newsArr) - 2 : 1 == f.position ? f.position = t(f.newsArr) - 1 : f.position = f.position - 2, e(f.dom.titleElem).html(f.newsArr["item-" + f.position].type), e(f.dom.contentID).html(f.newsArr["item-" + f.position].content);
124                        break;
125                    case "next":
126                        e(f.dom.titleElem).html(f.newsArr["item-" + f.position].type), e(f.dom.contentID).html(f.newsArr["item-" + f.position].content)
127                }
128                f.position == t(f.newsArr) - 1 ? f.position = 0 : f.position++
129            }
130            var I = d(),
131                f = {
132                    position: 0,
133                    time: 0,
134                    distance: 0,
135                    newsArr: {},
136                    play: !0,
137                    paused: !1,
138                    contentLoaded: !1,
139                    dom: {
140                        contentID: "#ticker-content-" + I,
141                        titleID: "#ticker-title-" + I,
142                        titleElem: "#ticker-title-" + I + " SPAN",
143                        tickerID: "#ticker-" + I,
144                        wrapperID: "#ticker-wrapper-" + I,
145                        revealID: "#ticker-swipe-" + I,
146                        revealElem: "#ticker-swipe-" + I + " SPAN",
147                        controlsID: "#ticker-controls-" + I,
148                        prevID: "#prev-" + I,
149                        nextID: "#next-" + I,
150                        playPauseID: "#play-pause-" + I
151                    }
152                };
153            return "UL" != i && "OL" != i && o.htmlFeed === !0 ? (l("Cannot use <" + i.toLowerCase() + "> type of element for this plugin - must of type <ul> or <ol>"), !1) : ("rtl" == o.direction ? o.direction = "right" : o.direction = "left", void a())
154        })
155    }, e.fn.ticker.defaults = {
156        speed: .05,
157        ajaxFeed: !1,
158        feedUrl: "",
159        feedType: "xml",
160        displayType: "reveal",
161        htmlFeed: !0,
162        debugMode: !0,
163        controls: !1,
164        direction: "ltr",
165        pauseOnItems: 3e3,
166        fadeInSpeed: 600,
167        fadeOutSpeed: 300
168    }, e("#sample").ticker()
169}(jQuery);

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.